Linux text View command cat, more, less, head,tail

Source: Internet
Author: User

October 8, 2014 weather: Wind-free haze air Pollution index 452 serious pollution

①cat/etc/rc.d/rc.sysyinit

Display all text content to the terminal

Common Parameters-N Add display line numbers

Shift+pageup front page Shift+pagedown back page

Disadvantage: Dumping display data so you can only page back to view the data in the cache, if too much data can not display the previous data. A person who thinks fit to display little text, or very familiar text

②more/etc/rc.d/rc.sysyinit

Support Split-screen display

Blank after turn a screen b before turning one screen return display line

Cons: Turn to the last screen and exit.

③less/etc/rc.d/rc.sysyinit

Support Split-screen display

Blank after turn a screen b before turning one screen return display line

Even if you don't quit at the end, you can still turn the screen forward.

④head: View the first n rows of a file default 10 rows-n Specifies how many rows are displayed

Tail: View the file's after n rows by default 10 rows-n Specifies how many rows are displayed

Head/etc/rc.d/rc.sysinit Show Top 10 lines

Head-n 3/etc/rc.d/rc.sysinit Show Top 3 lines

Tail ibid.

TAIL–F displays files but does not exit waiting for the information that other processes append to this file to be displayed in time

Often used to display view log file monitoring view

Linux text View command cat, more, less, head,tail

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.