Linux command —-— more

Source: Internet
Author: User

  1. Command format:

    More [options] File

  2. Command function:

    View the contents of a file, which can be displayed on a page

  3. Common options:

    +n starting from Nth line

    -N defines the screen display size to show N rows when viewed

    The +/keyword appears from the first two lines of the line that contains the keyword

    - C clear the screen from the top and start showing

    - D prompt to press space to continue when viewing, press Q to exit

    - s displays a contiguous number of empty rows as a row

    - v Displays the underline in the contents of the file

  4. Common key operation:

    Enter scrolls down n rows, can be defined, default is 1 rows

    SPACEBAR scrolls down one screen

    ctrl+b scroll up one screen

    = Display the current line number

    : F Displays the file name and the current line number

    v Call VI Editor

    Q Exit more

  5. Common examples:

    Example one: Starting from the third line of file

    Command: More +3 file

    Example two: viewing file files and defining 5 rows each time the screen is displayed

    Command: more-5 file

    Example three: Find the first line in the file that appears with the string "the" and display it from the first two lines of the line

    Command: More +/the file

    Example four: If there are too many files in the listed directory, you can combine pipe characters with more paging display

    Command: Ls-l | more-5

    Description: Display 5 files or directory information per page, press space to display the next 5 files or directories

This article is from the "Shiyu" blog, make sure to keep this source http://928004321.blog.51cto.com/10707688/1731209

Linux command —-— more

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.