In
computing,
more
is a
command
Command may refer to:
Computing
* Command (computing), a statement in a computer language
* COMMAND.COM, the default operating system shell and command-line interpreter for DOS
* Command key, a modifier key on Apple Macintosh computer keyboards
* ...
to view (but not modify) the contents of a
text file
A text file (sometimes spelled textfile; an old alternative name is flatfile) is a kind of computer file that is structured as a sequence of lines of electronic text. A text file exists stored as data within a computer file system. In operatin ...
one screen at a time.
It is available on
Unix
Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, and ot ...
and
Unix-like systems,
DOS
DOS is shorthand for the MS-DOS and IBM PC DOS family of operating systems.
DOS may also refer to:
Computing
* Data over signalling (DoS), multiplexing data onto a signalling channel
* Denial-of-service attack (DoS), an attack on a communicatio ...
,
Digital Research
Digital Research, Inc. (DR or DRI) was a company created by Gary Kildall to market and develop his CP/M operating system and related 8-bit, 16-bit and 32-bit systems like MP/M, Concurrent DOS, FlexOS, Multiuser DOS, DOS Plus, DR DOS and G ...
FlexOS
FlexOS is a discontinued modular real-time multiuser multitasking operating system (RTOS) designed for computer-integrated manufacturing, laboratory, retail and financial markets. Developed by Digital Research's Flexible Automation Business U ...
,
IBM/
Toshiba
, commonly known as Toshiba and stylized as TOSHIBA, is a Japanese multinational conglomerate corporation headquartered in Minato, Tokyo, Japan. Its diversified products and services include power, industrial and social infrastructure syste ...
4690 OS
4690 Operating System (sometimes shortened to 4690 OS or 4690) is a specially designed point of sale (POS) operating system, originally sold by IBM. In 2012, IBM sold its retail business, including this product, to Toshiba, which assumed support. ...
, IBM
OS/2
OS/2 (Operating System/2) is a series of computer operating systems, initially created by Microsoft and IBM under the leadership of IBM software designer Ed Iacobucci. As a result of a feud between the two companies over how to position OS/2 re ...
,
Microsoft Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for se ...
and
ReactOS
ReactOS is a free and open-source operating system for amd64/ i686 personal computers intended to be binary-compatible with computer programs and device drivers made for Windows Server 2003 and later versions of Windows. ReactOS has been noted ...
. 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.
History
The
more
command was originally written by Daniel Halbert, a graduate student at the
University of California, Berkeley
The University of California, Berkeley (UC Berkeley, Berkeley, Cal, or California) is a public land-grant research university in Berkeley, California. Established in 1868 as the University of California, it is the state's first land-grant univ ...
, 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
History (derived ) is the systematic study and the documentation of the human activity. The time period of event before the invention of writing systems is considered prehistory. "History" is an umbrella term comprising past events as well ...
). It was first included in 3.0
BSD
The Berkeley Software Distribution or Berkeley Standard Distribution (BSD) is a discontinued operating system based on Research Unix, developed and distributed by the Computer Systems Research Group (CSRG) at the University of California, Berke ...
, and has since become a standard program in all Unix systems.
less
Less or LESS may refer to: fewer than,: not as much.
Computing
* less (Unix)
less is a terminal pager program on Unix, Windows, and Unix-like systems used to view (but not change) the contents of a text file one screen at a time. It is simila ...
, 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
MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few oper ...
versions 2 and later.
A
more
command is also part of
ASCII
ASCII ( ), abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Because of ...
's ''MSX-DOS2 Tools'' for
MSX-DOS
MSX-DOS is a discontinued disk operating system developed by Microsoft for the 8-bit home computer standard MSX, and is a cross between MS-DOS 1.25 and CP/M-80 2.
MSX-DOS
MSX-DOS and the extended BASIC with 3½-inch floppy disk support ...
version 2.
The Software Link
The Software Link, Inc. (TSL) was a company in Norcross, Georgia that developed software for personal computers from 1986 to 1994. The company was co-founded by Rod Roark and Gary Robertson.
Products
* PC-MOS: an MS-DOS-like multiuser operating ...
's
PC-MOS
PC-MOS/386 is a multi-user, multitasking computer operating system produced by The Software Link (TSL), announced at COMDEX in November 1986 for February 1987 release. PC-MOS/386, a successor to PC-MOS, can run many MS-DOS programs on the host ...
includes an implementation of
more
. Like the rest of the operating system, it is licensed under the
GPL v3
The GNU General Public License (GNU GPL or simply GPL) is a series of widely used free software licenses that guarantee end users the four freedoms to run, study, share, and modify the software. The license was the first copyleft for general us ...
. The
FreeDOS
FreeDOS (formerly Free-DOS and PD-DOS) is a free software operating system for IBM PC compatible computers. It intends to provide a complete MS-DOS-compatible environment for running legacy software and supporting embedded systems.
FreeDOS ca ...
version was developed by
Jim Hall and is licensed under the
GPL v2
The GNU General Public License (GNU GPL or simply GPL) is a series of widely used free software licenses that guarantee end users the four freedoms to run, study, share, and modify the software. The license was the first copyleft for general us ...
. The command is also available in the
KolibriOS
KolibriOS, or Kolibri, is a small, open-source x86 operating system written completely in assembly. It was forked from MenuetOS in 2004 and has run under independent development since.
In a 2009 review piece on alternative operating systems, ' ...
Shell.
The
numerical computing environments
MATLAB
MATLAB (an abbreviation of "MATrix LABoratory") is a proprietary multi-paradigm programming language and numeric computing environment developed by MathWorks. MATLAB allows matrix manipulations, plotting of functions and data, implementatio ...
and
GNU Octave
GNU Octave is a high-level programming language primarily intended for scientific computing and numerical computation. Octave helps in solving linear and nonlinear problems numerically, and for performing other numerical experiments using a langu ...
include a
more
function that turns output pagination on or off.
Usage
Unix-like
The command-
syntax
In linguistics, syntax () is the study of how words and morphemes combine to form larger units such as phrases and sentences. Central concerns of syntax include word order, grammatical relations, hierarchical sentence structure (constituency ...
is:
more
ptionsile_name
Ile may refer to:
* iLe, a Puerto Rican singer
* Ile District (disambiguation), multiple places
* Ilé-Ifẹ̀, an ancient Yoruba city in south-western Nigeria
* Interlingue (ISO 639:ile), a planned language
* Isoleucine, an amino acid
* Another ...
If no file name is provided,
more
looks for input from
standard input
In computer programming, standard streams are interconnected input and output communication channels between a computer program and its environment when it begins execution. The three input/output (I/O) connections are called standard input (stdi ...
.
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.
Options
Options are typically entered before the file name, but can also be entered in the
environment variable
An environment variable is a dynamic-named value that can affect the way running processes will behave on a computer. They are part of the environment in which a process runs. For example, a running process can query the value of the TEMP en ...
$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
ress space to continue, 'q' to quit./samp> and will display ress 'h' for instructions./samp> 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 command-syntax is:
command , more c p s tn n more [ c p s tn[+n < [Drive:] [Path] FileName
more c p s tn n iles
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 < rive: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 Directory (file systems), system directory using the dir
command and display it one screen at a time using the more
command:
:\ir C:\OS2 , more
See also
* pg (Unix)
pg is a terminal pager program on Unix and Unix-like systems for viewing text files. It can also be used to page through the output of a command via a pipe. pg uses an interface similar to vi, but commands are different.
As of 2018, pg has be ...
* less (Unix)
less is a terminal pager program on Unix, Windows, and Unix-like systems used to view (but not change) the contents of a text file one screen at a time. It is similar to , but has the extended capability of allowing both forward and backward na ...
* most (Unix)
most is a terminal pager program on Unix, OpenVMS, MS-DOS, Windows and Unix-like systems used to view (but not change) the contents of a text file one screen at a time. Programs of this sort are called ''pagers''. It is similar to more, but ha ...
References
Further reading
*
*
*
*
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
{{Windows commands
Standard Unix programs
Unix SUS2008 utilities
Terminal pagers
External DOS commands
Microsoft free software
OS/2 commands
ReactOS commands
Windows commands
Windows administration