Linux Beginner's Note four: The Linux file Management class command is detailed! (Video serial number: 03_1)

Source: Internet
Author: User

Commands to learn in this section:Cat (TAC), More,less,head,tail,cut,sort,uniq,wc,tr

Skills learned in this section: Directory Management

File Management

Date Time

View text

Split screen Display

Text Processing

Summary of File management commands:

Directory Management :

LS, CD, pwd, mkdir, rmdir, tree

File Management :

Touch, stat, file, RM, CP, MV, Nano

Date Time :

Date, clock, Hwclock, Cal

To view text :

Cat, TAC, more, less, head, tail

  Cat: Connect and display

-N: Numbering each line when displayed

-E: Displays the line terminator for each line

(TheTAC command displays the text in turn)

split screen display :

More, less

  MORE: Support Backward, (disadvantage: Turn to the end of the file to exit)

  Less: Same as using the Man command (because the file is opened with less when using the man command)

  head: View Top N rows ("n" defaults to 10)

  tail: View after n rows

-N: Show first few lines

Tail-f: Look at the end of the file, do not exit, wait to display the subsequent append to this file new content;

Text Processing :

Cut, join, SED, awk

  cut: Cut files

-D: Specifies the field delimiter, which is the default space

-F: Specify the fields to display

-F 1, 3: Show First and three fields

-F 1-3: Show first to third field

  Sort: Text sort (default is sorted by ASCII code in ascending order)

-N: Sort by numeric size

-r: Sort by ASCII code descending

-T: Field delimiter

-K: Which field to sort the keywords for (sort-t:-K3/ETC/PASSWD)

-U: The same row is only displayed once after sorting

-F: Ignore character capitalization when sorting

  uniq: report which row has duplicate content (adjacent)

-C: Shows the number of rows in a file that repeats

-D: Show only duplicate rows

  WC (Word count): Text statistics (you can count how many lines, how many words, how many bytes in a file)

-L: Show only the number of rows

-W: Displays only the number of words

-c: Show only bytes of characters

-L: Shows how many characters are on the longest line

  TR: Character processing commands (converting or deleting characters)

TR [OPTION] ... SET1 [SET2]

-D: Delete all characters that appear in the character set

Linux Beginner's Note four: The Linux file Management class command is detailed! (Video serial number: 03_1)

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.