Monday 11 August 2014

more (command)


In processing,more is a command to view (yet not change) the substance of a content record one screen at once (terminal pager). It is accessible on Unix and Unix-like frameworks, DOS, OS/2, and Microsoft Windows. Programs of this sort are called pagers. more is a very basic pager, originally allowing only forward navigation through a file, though newer implementations do allow for limited backward movement.

The more command was initially composed by Daniel Halbert, a graduate understudy at the University of California, Berkeley, in 1978. It was initially included in 3.0 BSD, and has since turned into a standard program in all Unix frameworks. less, a comparable summon with the enlarged ability of permitting both forward and retrograde route through the record was composed by Mark Nudelman amid 1983-85 and is presently included in most Unix and Unix-like frameworks.

Utilization

Unix
The command-syntax is:
more [options] [file_name]
If no file name is provided, more looks for input from standard input.

Afresh has gotten data, it shows to the extent that can fit on the current screen and sits tight for client info to development, with the exemption that a structure nourish (^l) will additionally cause more to hold up at that line, paying little heed to the measure of content on the screen. In the lower-left corner of the screen is shown the content "- -More- -" and a rate, speaking to the percent of the document that progressively has paged through. (This rate incorporates the content showed on the current screen.) When more achieves the end of a record (100%) it retreats. The most widely recognized routines for exploring through a document are Enter, which progresses the yield by one line, and Space, which propels the yield by one screen.

There are likewise different orders that could be utilized while exploring through the record; counsel more's man page for more subtle elements.

Options

Options are typically entered before the file name, but can also be entered in the environment variable $MORE. Options entered in the actual command line will override those entered in the $MORE environment variable. Available options may vary between Unix systems, but a typical set of options is as follows:

-num: This option specifies an integer which is the screen size (in lines).
-d: more will prompt the user with the message "[Press space to continue, 'q' to quit.]" and will display "[Press 'h' for instructions.]" instead of ringing the bell when an illegal key is pressed.
-l: more usually treats ^L (form feed) as a special character, and will pause after any line that contains a form feed. The -l option will prevent this behavior.
-f: Causes more to count logical, rather than screen lines (i.e., long lines are not folded).
-p: Do not scroll. Instead, clear the whole screen and then display the text.
-c: Do not scroll. Instead, paint each screen from the top, clearing the remainder of each line as it is displayed.
-s: Squeeze multiple blank lines into one.
-u: Backspaces and carriage returns to be treated as printable characters;
+/: This option specifies a string that will be searched for before each file is displayed. (Ex.: more +/Preamble gpl.txt)
+num: Start at line number num.

Microsoft Windows

The command-syntax is:

charge | more [/c] [/p] [/s] [/tn] [+n]

more [[/c] [/p] [/s] [/tn] [+n]] < [drive:] [path] Filename

more [/c] [/p] [/s] [/tn] [+n] [files]

Illustrations :
To show the record named letter.txt on the screen, the client can sort both of the accompanying two commands:

more letter.txt
sort letter.txt | more

The command displays the first screen of information from letter.txt, and then the following prompt appears:

- More -

At the point when the spacebar is pressed, the following screen of data will be shown. It is likewise conceivable to clear the screen and evacuate all additional clear lines before showing the record:

more/c/s < letter.txt

sort letter.txt | more/c/s


OS/2
The command-syntax is:

MORE < [drive:][path]filename
command | more
drive:\path\filename – Specifies the location of the file to display one screen at a time.
command | – Specifies the command whose output will be displayed.

Sample:
Furnish a proportional payback of the OS/2 framework catalog utilizing the dir summon and show it one screen at once utilizing the more order:

[c:\]dir C:\os2 |