Use and difference of CAT, more, and less commands

Source: Internet
Author: User
The cat command function is used to display the content of the entire file. Therefore, it is often used together with the more command. The cat command also combines several files into one file.
More command: Pause the screen when the page is full. Press space to continue displaying the next screen or press the Q key to stop the screen. Less command: the usage of the less command is similar to that of the more command. It can also be used to browse files on more than one page. The difference is that the less command can not only display the file down by pressing the Space key, but also use the up or down key to scroll the file. To end browsing, press the Q key at the less command prompt.

Name: less permission: All users use less [Option] filenameless, which is similar to more and can be used to browse text files, the difference is that less allows users to scroll back to browse the parts that have already been viewed. At the same time, because less does not read the entire file at the beginning, when a large file is opened, it is faster than the general document Editor (such as VI. Name: more permission: usage of all users: more [-dlfpcsu] [-num] [+/pattern] [+ linenum] [filenames ..]
In fact, apart from the cat command, these three commands have the ability to merge files. The other functions are similar, but they differ in browsing habits and display methods.

Use and difference of CAT, more, and less commands

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.