2010年8月8日星期日

linux more command: read files by page

Description:
more command and command similar to cat, cat command is the entire contents of a file to standard output, and more orders are displayed as a page file, user-friendly read.

Syntax:

more [-dlfpcsu] [-num] [+ / pattern] [+ num] [fileNames ..]

Options description:
-D: prompt the user, the screen shown below [Press space to continue, q to quit.], If the user pressed the wrong button, it will show [Press h for instructions.] Instead of beeps;
-L: Cancel meet the special characters ^ L (feed characters) will be suspended during the function;
-F: When calculating the number of rows to the number of rows in fact, rather than wrap the line after the number of (some single words too long will be extended to more than two lines or two lines);
-P: no way to scroll display on each page, but first clear the screen after the display;
-C: with the-p similar, except that the first display and then clear the other old data;
-S: When faced with two lines or more consecutive blank line, the substitution for the line of blank lines;
-U: do not display the next quote (according to the specified terminal environment variable TERM vary);
+ /: Search for each file before displaying the string (pattern), and then start from the string after the show;
-Num: Display to num lines;
+ Num: num lines from the beginning to show;

Implementation of the example:

01 $ more text

02 test.sh

03 link

04 123

05 $ more -2 text

06 test.sh

07 link

08 --More--(76%)

09 $ more +2 text

10 link

11 123

12 $ ls -l | more

Extended reading:
more interactive command options:
Press the spacebar (space) next page;
Press b button will back a display;
Press q to exit;
/ Pattern: search forward from the current location of a specified pattern of characters specified location

没有评论:

发表评论