More (command)

Short description: Terminal pager available on various operating systems

more

Example output of the `more` command

Original author(s)| Daniel Halbert, Eric Shienbrood, Geoff Peck,[1] John Foderaro[2]
Developer(s)| DR, Microsoft, IBM, Toshiba, TSL, Jim Hall
Initial release| 1978, 47-48 years ago
Written in| MS-DOS, PC-MOS: x86 assembly language
FreeDOS, ReactOS: C
Operating system| Cross-platform
Type| Command
License| Unix, Unix-like: BSD License, CDDL
MS-DOS: MIT
FreeDOS, ReactOS: GPL v2
PC-MOS: GPL v3

In computing, `more` is a command to view (but not modify) the contents of a text file one screen at a time. It is available on Unix and Unix-like systems, DOS,[3] Digital Research FlexOS,[4] IBM/Toshiba 4690 OS,[5] IBM OS/2,[6] Microsoft Windows and ReactOS.[7] Programs of this sort are called pagers.[8] `more` is a very basic pager, originally allowing only forward navigation through a file, though newer implementations do allow for limited backward movement.

## Contents

* 1 History
* 2 Usage
* 2.1 Unix-like
* 2.1.1 Options
* 2.2 Microsoft Windows and ReactOS
* 2.2.1 Examples
* 2.3 IBM OS/2
* 2.3.1 Example
* 3 See also
* 4 References
* 5 Further reading
* 6 External links

## History

The `more` command was originally written by Daniel Halbert, a graduate student at the University of California, Berkeley, in 1978. It was later expanded on by Eric Shienbrood, Geoff Peck (added underlining, single spacing) and John Foderaro (added -c, `more` environment variable `history`). It was first included in 3.0 BSD, and has since become a standard program in all Unix systems. `less`, a similar command with the extended capability of allowing both forward and backward navigation through the file, was written by Mark Nudelman between 1983 and 1985 and is now included in most Unix and Unix-like systems.

The command is available in MS-DOS versions 2 and later.[9] A `more` command is also part of ASCII's MSX-DOS2 Tools for MSX-DOS version 2.[10] The Software Link's PC-MOS includes an implementation of `more`.[11] Like the rest of the operating system, it is licensed under the GPL v3.[12] The FreeDOS version was developed by Jim Hall and is licensed under the GPL v2.[13] The command is also available in the KolibriOS Shell.[14]

The numerical computing environments MATLAB and GNU Octave include a `more` function that turns output pagination on or off.[15][16]

## Usage

### Unix-like

The command-syntax is:

more [options] [file_name]

If no file name is provided, `more` looks for input from standard input.

Once `more` has obtained input, it displays as much as can fit on the current screen and waits for user input to advance, with the exception that a form feed (^L) will also cause `more` to wait at that line, regardless of the amount of text on the screen. In the lower-left corner of the screen is displayed the text "--More--" and a percentage, representing the percent of the file that `more` has paged through. (This percentage includes the text displayed on the current screen.) When `more` reaches the end of a file (100%) it exits. The most common methods of navigating through a file are `Enter`, which advances the output by one line, and `Space`, which advances the output by one screen.

There are also other commands that can be used while navigating through the document; consult `more`'s `man` page for more details.[17]

#### 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 and ReactOS

The ReactOS `more` command

The command-syntax is:[18]

command | more [/c] [/p] [/s] [/tn] [+n]
more /c] [/p] [/s] [/tn] [+n < [Drive:] [Path] FileName
more [/c] [/p] [/s] [/tn] [+n] [files]

#### Examples

To display the file named letter.txt on the screen, the user can type either of the following two commands:

more letter.txt
type letter.txt | more

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

-- More—When the spacebar is pressed, the next screen of information will be displayed.

It is also possible to clear the screen and remove all extra blank lines before displaying the file:

more /c /s < letter.txt
type letter.txt | more /c /s

### IBM 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.

#### Example

Return the content of the OS/2 system directory using the `dir` command and display it one screen at a time using the `more` command:

[C:\]dir C:\OS2 | more

## See also

* pg (Unix)
* less (Unix)
* most (Unix)

## References

1. ↑ Early history of the more command
2. ↑ more(1) — Linux manual pages
3. ↑ "ibiblio.org FreeDOS Group -- FreeDOS Base". http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/group-base.html.
4. ↑ "Users guide". www.bitsavers.org. http://www.bitsavers.org/pdf/digitalResearch/flexos/1073-2003_FlexOS_Users_Guide_V1.3_Nov86.pdf.
5. ↑ [1][|permanent dead link|dead link}}]
6. ↑ "JaTomes Help - OS/2 Commands". http://www.jatomes.com/Help/Os2Cmd.php#MORE.
7. ↑ "reactos/reactos". 3 January 2022. https://github.com/reactos/reactos.
8. ↑ "pager from FOLDOC". http://foldoc.org/pager.
9. ↑ Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition. Microsoft Press. 2003. ISBN 0-7356-1812-7.
10. ↑ MSX-DOS2 Tools User's Manual by ASCII Corporation
11. ↑ "roelandjansen/pcmos386v501". 2 January 2022. https://github.com/roelandjansen/pcmos386v501.
12. ↑ Jansen, Roeland (8 February 2018). "pcmos386v501: PC-MOS/386 v5.01 final release including cdrom driver sources". https://github.com/roelandjansen/pcmos386v501.
13. ↑ "ibiblio.org FreeDOS Package -- more (FreeDOS Base)". http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/more.html.
14. ↑ "Shell - KolibriOS wiki". http://wiki.kolibrios.org/wiki/Shell.
15. ↑ "Control paged output in Command Window - MATLAB more". https://www.mathworks.com/help/matlab/ref/more.html.
16. ↑ "Function Reference: more". https://octave.sourceforge.io/octave/function/more.html.
17. ↑ `more`: display files on a page-by-page basis – Commands & Utilities Reference, The Single UNIX Specification, Issue 7 from The Open Group
18. ↑ "More". https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-xp/bb490933(v=technet.10).

## Further reading

* Special Edition Using MS-DOS 6.22, Third Edition. Que Publishing. 2001. ISBN 978-0789725738.
* Kathy Ivens; Brian Proffit (1993). OS/2 Inside & Out. Osborne McGraw-Hill. ISBN 978-0078818714.
* Stanek, William R. (2008). Windows Command-Line Administrator's Pocket Consultant, 2nd Edition. Microsoft Press. ISBN 978-0735622623.
* The Mac OS X Command Line: Unix Under the Hood. John Wiley & Sons. 2006. ISBN 978-0470113851.

## External links

* "FOLDOC entry for pager"; see definition #2.
* manpage of more
* more | Microsoft Docs
* Open source MORE implementation that comes with MS-DOS v2.0
* https://www.question-defense.com/documentation/linux-manpages/more

* v
* t
* e

Unix command-line interface programs and shell builtins

File system|

* cat
* chmod
* chown
* chgrp
* cksum
* cmp
* cp
* dd
* du
* df
* file
* fuser
* ln
* ls
* mkdir
* mv
* pax
* pwd
* rm
* rmdir
* split
* tee
* touch
* type
* umask

Processes|

* at
* bg
* crontab
* fg
* kill
* nice
* ps
* time

User environment|

* env
* exit
* logname
* mesg
* talk
* tput
* uname
* who
* write

Text processing|

* awk
* basename
* comm
* csplit
* cut
* diff
* dirname
* ed
* ex
* fold
* head
* iconv
* join
* m4
* more
* nl
* paste
* patch
* printf
* sed
* sort
* strings
* tail
* tr
* uniq
* vi
* wc
* xargs

Shell builtins|

* alias
* cd
* echo
* test
* unset
* wait

Searching|

* find
* grep

Documentation|

* man

Software development|

* ar
* ctags
* lex
* make
* nm
* strip
* yacc

Miscellaneous|

* bc
* cal
* expr
* lp
* od
* sleep
* true and false

* Categories
* Standard Unix programs
* Unix SUS2008 utilities
* List

* v
* t
* e

Windows command-line programs and shell builtins

* COMMAND.COM
* Command Prompt
* Windows PowerShell
* Recovery Console

File system navigation|

* cd (chdir)
* dir
* popd
* pushd
* tree

File management|

* attrib
* cacls
* cipher
* compact
* copy
* del (erase)
* deltree
* expand
* icacls
* makecab
* mkdir (md)
* mklink
* move
* recover
* ren (rename)
* replace
* rmdir (rd)
* robocopy
* tar
* xcopy

Disk management|

* chkdsk
* convert
* defrag
* diskcomp
* diskcopy
* diskpart
* drvspace
* fdisk
* format
* label
* manage-bde
* subst
* scandisk
* sys
* vol
* vssadmin

Processes|

* at
* exit
* kill
* powercfg
* runas
* sc
* schtasks
* shutdown
* start
* taskkill
* tasklist

Registry|

* assoc
* ftype
* reg
* regini
* regsvr32

User environment|

* date
* mode
* path
* set
* setx
* time
* title
* ver
* whoami

File contents|

* comp
* edit
* edlin
* fc
* find
* findstr
* print
* type

Scripting|

* choice
* clip
* cscript
* doskey
* echo
* for
* forfiles
* goto
* if
* more
* pause
* prompt
* rem
* timeout

Networking|

* arp
* BITSAdmin
* cURL
* getmac
* hostname
* ipconfig
* net
* netsh
* netstat
* nslookup
* PathPing
* ping
* route
* scp
* sftp
* ssh
* ssh-add
* ssh-agent
* ssh-keygen
* ssh-keyscan
* tracert
* winrm
* winrs

Maintenance and care|

* driverquery
* eventcreate
* eventtriggers
* msiexec
* ntbackup
* sfc
* systeminfo
* w32tm
* WBAdmin
* winsat
* wmic

Boot management|

* bcdedit
* bootcfg
* fixboot
* fixmbr

Software development|

* debug
* exe2bin
* QBasic

Miscellaneous|

* cls
* dism
* dpath
* gpupdate
* help
* MSCDEX
* pentnt
* wsl

* List of DOS commands
* Environment variables

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/More (command). Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Software:More_(command)&oldid=785034"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template