{{Short description|Terminal pager available on various operating systems}} {{lowercase}} {{Infobox software | name = more | logo = | screenshot = Unix_more_output.png | screenshot size = 300px | caption = Example output of the <code>more</code> command | author = Daniel Halbert<br>Eric Shienbrood<br>Geoff Peck<ref>{{Cite web |url=http://danhalbert.org/more.html |title=Early history of the more command |access-date=2012-07-28 |archive-date=2013-09-04 |archive-url=https://web.archive.org/web/20130904171718/http://danhalbert.org/more.html |url-status=live }}</ref><br>John Foderaro<ref>{{Cite web |url=http://manpages.courier-mta.org/htmlman1/more.1.html |title=more(1) — Linux manual pages |access-date=2020-06-10 |archive-date=2020-06-10 |archive-url=https://web.archive.org/web/20200610002614/http://manpages.courier-mta.org/htmlman1/more.1.html |url-status=live }}</ref> | developer = DR, Microsoft, IBM, Toshiba, TSL, Jim Hall | released = {{Release year|df=yes|1978}} | latest release version = | latest release date = | programming language = MS-DOS, PC-MOS: x86 assembly language<br />FreeDOS, ReactOS: C | operating system = Cross-platform | genre = Command | license = Unix, Unix-like: BSD License, CDDL<br />MS-DOS: MIT<br />FreeDOS, ReactOS: GPL v2<br />PC-MOS: GPL v3 | website = }}
In computing, '''<code>more</code>''' 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, MS-DOS,<ref>{{cite web|url=http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/group-base.html|title=ibiblio.org FreeDOS Group -- FreeDOS Base|website=www.ibiblio.org|access-date=2018-07-22|archive-date=2019-03-30|archive-url=https://web.archive.org/web/20190330202353/http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/group-base.html|url-status=live}}</ref> Digital Research FlexOS,<ref>{{cite web |url=http://www.bitsavers.org/pdf/digitalResearch/flexos/1073-2003_FlexOS_Users_Guide_V1.3_Nov86.pdf |title=Users guide |publisher=www.bitsavers.org |access-date=2020-01-30 |archive-date=2019-09-25 |archive-url=https://web.archive.org/web/20190925131719/http://bitsavers.org/pdf/digitalResearch/flexos/1073-2003_FlexOS_Users_Guide_V1.3_Nov86.pdf |url-status=dead }}</ref> IBM/Toshiba 4690 OS,<ref>[https://archive.org/details/4690OSV6r2UsersGuide/page/n169]{{dead link|date=January 2020}}</ref> IBM OS/2,<ref>{{cite web|url=http://www.jatomes.com/Help/Os2Cmd.php#MORE|title=JaTomes Help - OS/2 Commands|website=www.jatomes.com|access-date=2019-07-28|archive-date=2019-04-14|archive-url=https://web.archive.org/web/20190414130029/http://www.jatomes.com/Help/Os2Cmd.php#MORE|url-status=dead}}</ref> Windows and ReactOS.<ref>{{cite web|url=https://github.com/reactos/reactos|title=reactos/reactos|website=GitHub|date=3 January 2022|access-date=28 July 2019|archive-date=11 December 2017|archive-url=https://web.archive.org/web/20171211170155/https://github.com/reactos/reactos|url-status=live}}</ref> Programs of this sort are called ''pagers''.<ref>{{cite web|url=http://foldoc.org/pager|title=pager from FOLDOC|website=foldoc.org|access-date=2020-01-30|archive-date=2020-01-30|archive-url=https://web.archive.org/web/20200130011321/http://foldoc.org/pager|url-status=live}}</ref> <code>more</code> is a very basic pager, originally allowing only forward navigation through a file, though newer implementations do allow for limited backward movement.
==History== The <code>more</code> 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, <code>more</code> environment variable <code>history</code>). It was first included in 3.0 BSD, and has since become a standard program in all Unix systems. <code>less</code>, 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.<ref name="RUNNINGMSDOS">{{Cite book|author-last=Wolverton|author-first=Van|title=Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition|date=2003|publisher=Microsoft Press|isbn=0-7356-1812-7}}</ref> A <code>more</code> command is also part of ASCII's ''MSX-DOS2 Tools'' for MSX-DOS version 2.<ref>[https://archive.org/details/MSXDOS2TOOLS MSX-DOS2 Tools User's Manual by ASCII Corporation]</ref> The Software Link's PC-MOS includes an implementation of <code>more</code>.<ref>{{cite web|url=https://github.com/roelandjansen/pcmos386v501|title=roelandjansen/pcmos386v501|website=GitHub|date=2 January 2022|access-date=28 July 2019|archive-date=4 May 2021|archive-url=https://web.archive.org/web/20210504053616/https://github.com/roelandjansen/pcmos386v501|url-status=live}}</ref> Like the rest of the operating system, it is licensed under the GPL v3.<ref>{{cite web|url=https://github.com/roelandjansen/pcmos386v501|title=pcmos386v501: PC-MOS/386 v5.01 final release including cdrom driver sources|first=Roeland|last=Jansen|date=8 February 2018|via=GitHub|access-date=28 July 2019|archive-date=4 May 2021|archive-url=https://web.archive.org/web/20210504053616/https://github.com/roelandjansen/pcmos386v501|url-status=live}}</ref> The FreeDOS version was developed by Jim Hall and is licensed under the GPL v2.<ref>{{cite web|url=http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/more.html|title=ibiblio.org FreeDOS Package -- more (FreeDOS Base)|website=www.ibiblio.org|access-date=2018-11-13|archive-date=2018-10-22|archive-url=https://web.archive.org/web/20181022171527/http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/more.html|url-status=live}}</ref> The command is also available in the KolibriOS Shell.<ref>{{cite web|url=http://wiki.kolibrios.org/wiki/Shell|title=Shell - KolibriOS wiki|website=wiki.kolibrios.org|access-date=2019-03-25|archive-date=2019-02-11|archive-url=https://web.archive.org/web/20190211231827/http://wiki.kolibrios.org/wiki/Shell|url-status=live}}</ref>
The numerical computing environments MATLAB and GNU Octave include a <code>more</code> function that turns output pagination on or off.<ref>{{cite web|url=https://www.mathworks.com/help/matlab/ref/more.html|title=Control paged output in Command Window - MATLAB more|website=www.mathworks.com|access-date=2019-04-06|archive-date=2019-04-06|archive-url=https://web.archive.org/web/20190406170028/https://www.mathworks.com/help/matlab/ref/more.html|url-status=live}}</ref><ref>{{cite web|url=https://octave.sourceforge.io/octave/function/more.html|title=Function Reference: more|website=octave.sourceforge.io|access-date=2019-04-06|archive-date=2019-02-02|archive-url=https://web.archive.org/web/20190202152604/https://octave.sourceforge.io/octave/function/more.html|url-status=live}}</ref>
==Usage==
===Unix-like=== The command-syntax is:
more [options] [file_name]
If no file name is provided, <code>more</code> looks for input from standard input.
Once <code>more</code> 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 <code>more</code> 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 <code>more</code> has paged through. (This percentage includes the text displayed on the current screen.) When <code>more</code> reaches the end of a file (100%) it exits. The most common methods of navigating through a file are <kbd>Enter</kbd>, which advances the output by one line, and <kbd>Space</kbd>, which advances the output by one screen.
There are also other commands that can be used while navigating through the document; consult <code>more</code>'s <code>man</code> page for more details.<ref>{{man|cu|more|SUS|display files on a page-by-page basis}}</ref>
====Options==== Options are typically entered before the file name, but can also be entered in the environment variable <code>$MORE</code>. Options entered in the actual command line will override those entered in the <code>$MORE</code> environment variable. Available options may vary between Unix systems, but a typical set of options is as follows:
* <kbd>'''-num'''</kbd>: This option specifies an integer which is the screen size (in lines). * <kbd>'''-d'''</kbd>: <code>more</code> will prompt the user with the message <samp>[Press space to continue, 'q' to quit.]</samp> and will display <samp>[Press 'h' for instructions.]</samp> instead of ringing the bell when an illegal key is pressed. * <kbd>'''-l'''</kbd>: <code>more</code> usually treats <kbd>^L</kbd> (form feed) as a special character, and will pause after any line that contains a form feed. The <kbd>-l</kbd> option will prevent this behavior. * <kbd>'''-f'''</kbd>: Causes <code>more</code> to count logical, rather than screen lines (i.e., long lines are not folded). * <kbd>'''-p'''</kbd>: Do not scroll. Instead, clear the whole screen and then display the text. * <kbd>'''-c'''</kbd>: Do not scroll. Instead, paint each screen from the top, clearing the remainder of each line as it is displayed. * <kbd>'''-s'''</kbd>: Squeeze multiple blank lines into one. * <kbd>'''-u'''</kbd>: Backspaces and carriage returns to be treated as printable characters; * <kbd>'''+/'''</kbd>: This option specifies a string that will be searched for before each file is displayed. (Ex.: <kbd>more +/Preamble gpl.txt</kbd>) * <kbd>'''+num'''</kbd>: Start at line number <kbd>num</kbd>.
===Microsoft Windows and ReactOS=== [[File:ReactOS-0.4.13 more command 667x434.png|thumb|300px|The ReactOS <code>more</code> command]] The command-syntax is:<ref>{{cite web|url=https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-xp/bb490933(v%3dtechnet.10)|title=More|website=docs.microsoft.com}}</ref>
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
*<code>'''drive:\path\filename'''</code> – Specifies the location of the file to display one screen at a time. *<code>'''command |'''</code> – Specifies the command whose output will be displayed.
====Example==== Return the content of the OS/2 system directory using the <code>dir</code> command and display it one screen at a time using the <code>more</code> command:
<syntaxhighlight lang="text"> [C:\]dir C:\OS2 | more </syntaxhighlight>
==See also== * pg (Unix) * less (Unix) * most (Unix)
==References== {{Reflist}}
==Further reading== *{{Cite book|author-last=Cooper|author-first=Jim|title=Special Edition Using MS-DOS 6.22, Third Edition|date=2001|publisher=Que Publishing|isbn=978-0789725738}} *{{Cite book|author1=Kathy Ivens|author2=Brian Proffit|year=1993|title=OS/2 Inside & Out|publisher=Osborne McGraw-Hill|isbn=978-0078818714}} *{{Cite book|first=William R.|last=Stanek|year=2008|title=Windows Command-Line Administrator's Pocket Consultant, 2nd Edition|publisher=Microsoft Press|isbn=978-0735622623}} *{{Cite book|author-last=McElhearn|author-first=Kirk|title=The Mac OS X Command Line: Unix Under the Hood|date=2006|publisher=John Wiley & Sons|isbn=978-0470113851}}
==External links== {{Wikibooks|Guide to Windows Commands}} {{Wikibooks|Guide to Unix|Commands}} *[http://foldoc.org/?pager "FOLDOC entry for pager"]; see definition #2. *[https://www.mankier.com/1/more manpage of more] *[https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/more more | Microsoft Docs] *[https://github.com/microsoft/MS-DOS/blob/master/v2.0/source/MORE.ASM Open source MORE implementation that comes with MS-DOS v2.0] *https://www.question-defense.com/documentation/linux-manpages/more {{Webarchive|url=https://web.archive.org/web/20200610002605/https://www.question-defense.com/documentation/linux-manpages/more |date=2020-06-10 }}
{{Unix commands}} {{Windows commands}}
Category:Standard Unix programs Category:Unix SUS2008 utilities Category:Terminal pagers Category:External DOS commands Category:Microsoft free software Category:OS/2 commands Category:ReactOS commands Category:Windows commands Category:Windows administration