Linux file content View __linux

Source: Internet
Author: User

1, directly view all the content of the article: Cat, TAC, NL

(1) Cat: File output from the first line to the last row


(2) TAC: Writing is the reverse of cat, output is also from the last line to the first line


(3) NL: Similar to cat commands, but with line numbers


2, page production to see the content of the article: more, less

(1) The use of more



percentage of the last line showing the content of the article

SPACEBAR: Next page
Enter: down one line
\ character: Find one of the currently displayed characters
: F: Display the code that has been displayed
Q: Exit
B: Page back
(2) The use of less: and more the difference is that you can use PageDown: Page DOWN, pageup page up

3: Data interception: Head, tail

(1) head use: Head-n row number file name, remove the contents of the specified line from scratch


(2) Tail usage: tail-n row number file name, take out the contents of the following n rows


Think 1: Take out 11 lines to 20 lines of content

First take the first 20 lines of content, after the pipe out of 10 lines



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.