Linux File Management Command (note)

Source: Internet
Author: User

To view the text file Contents command:

Cat more TAC less head tail


Cat command Usage

Cat plus file name to view the file

Cat-n name Displays the file and displays the number of rows

Cat used to display small files, not too many files, if it is a large file there is no advantage.


More command usage

More behind with the file name to view the files.

More used to display large files can flip screen, space (space) upside down, b key up, but turn to the end of the file automatically exit can not be turned upside down.


TAC Command Usage

TAC + file name This command is used to reverse the display of the file, that is, the last line turns into the first line, and then pushes. This command is just the opposite of cat.


Less command usage

Less enhances the use of more, can flip pages and can also be turned upside down, and can be turned to the end of the forward, and support query characters and so on. The legendary man's function is shown in less. Man's function is less supported, and as with man, it is just a use for querying commands, one for displaying files.


Head command usage

This command is used to display the header of the file, with the default display of the first 10 lines of files without parameters.

Head name This command is used to display the first 10 lines of the name file.

Head-n number (rows) name displays the contents of the specified top n rows.


Tail command usage

The tail command is just the opposite of the head, a display header, and a display for the tail. Usage Ibid.

Tail has a command that is different from head, which supports real-time file updates. Such as:

tail-f Add filename This command will always stop where, if there are other users at the end of the file added other characters, here will be updated and displayed immediately.



Linux File Management Command (note)

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.