Linux Common Command Learning (i)

Source: Internet
Author: User

Document Operations Command:

LS Displays the current directory file CD into the directory PWD display the current file path mkdir Create directory rmdir Delete directory

Touch Add text file Stat View file Detail properties File View files encoded type RM Delete CP copy MV move


Text View command:

Cat-a display all content, including special symbols-e Displays the end of a line symbol-n Displays line numbers

More Page Backward

Less space page, b page back, enter the row, K forward,/find, Q exit

Head View Top N rows

Tail View the next n rows-f (see the end of the file, do not exit waiting for new additions to be displayed) to monitor real-time write information

Tail-f/etc/passwd tail-5/etc/passwd display after 5 lines or-N 5


Text Processing:

Cut text Cut command-D specify delimiter, default 1 spaces-F Specify the fields to display

Cut-d:-F 1 To: Split the text and display the first character 1,3 show the first and third 1-3 shows 1 to 3

Sed/awk Text Processing

Join text merge grep query command


Text sort:

Sort by comparison of character size, default ASCII sort-N numeric size sort-R reverse order-T Specify field separator

-k specifies from which location the delimiter begins. -u same row only displays one-F ignore character case

SORT-T:-k3/etc/passwd to: Start sorting from the third character for the separator

Uniq adjacent and the same repeating row displays only one-D only displays duplicate rows-D displays all the rows that are duplicates-C displays all rows and displays the number of repetitions


Text Statistics Command WC (Word count)

How many lines in the WC statistic text, number of words, bytes (spaces),-l show only the number of lines------the number of words-m characters--the longest line of-L contains how many characters


Character Processing command tr convert or delete characters

TR [option]: SET1 format TR ' ab ' AB ' A replaced by a b replaced by B-character comparison

TR ' AB ' AB ' </etc/passwd will convert all of the files in a and B to uppercase Ab ' A-Z ' A-Z

tr-d ' AB ' delete characters A and b


Time command:

Date current time clock software time Hwclock hardware time Cal Calendar

This article from "Day Up" blog, please be sure to keep this source http://bshark.blog.51cto.com/10309374/1895868

Linux Common Command Learning (i)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.