In
computing
Computing is any goal-oriented activity requiring, benefiting from, or creating computer, computing machinery. It includes the study and experimentation of algorithmic processes, and the development of both computer hardware, hardware and softw ...
,
more
is a
command
Command may refer to:
Computing
* Command (computing), a statement in a computer language
* command (Unix), a Unix command
* COMMAND.COM, the default operating system shell and command-line interpreter for DOS
* Command key, a modifier key on A ...
to view (but not modify) the contents of a
text file
A text file (sometimes spelled textfile; an old alternative name is flat file) 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 ope ...
one screen at a time.
It is available on
Unix
Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user 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, a ...
and
Unix-like
A Unix-like (sometimes referred to as UN*X, *nix or *NIX) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Uni ...
systems,
DOS
DOS (, ) is a family of disk-based operating systems for IBM PC compatible computers. The DOS family primarily consists of IBM PC DOS and a rebranded version, Microsoft's MS-DOS, both of which were introduced in 1981. Later compatible syste ...
,
Digital Research
Digital Research, Inc. (DR or DRI) was a privately held American software 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 ...
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 ...
,
IBM
International Business Machines Corporation (using the trademark IBM), nicknamed Big Blue, is an American Multinational corporation, multinational technology company headquartered in Armonk, New York, and present in over 175 countries. It is ...
/
Toshiba
is a Japanese multinational electronics company headquartered in Minato, Tokyo. Its diversified products and services include power, industrial and social infrastructure systems, elevators and escalators, electronic components, semiconductors ...
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 is a Proprietary software, proprietary computer operating system for x86 and PowerPC based personal computers. It was created and initially developed jointly by IBM and Microsoft, under the leadership of IBM software designer Ed Iacobucci, ...
,
Microsoft Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
and
ReactOS
ReactOS is a Free and open-source software, free and open-source operating system for i586/amd64 personal computers that is intended to be binary-code compatibility, binary-compatible with computer programs and device drivers developed for Wind ...
. 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 university, public Land-grant university, land-grant research university in Berkeley, California, United States. Founded in 1868 and named after t ...
, 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 is the systematic study of the past, focusing primarily on the Human history, human past. As an academic discipline, it analyses and interprets evidence to construct narratives about what happened and explain why it happened. Some t ...
). It was first included in 3.0
BSD
The Berkeley Software Distribution (BSD), also known as Berkeley Unix or BSD Unix, is a discontinued Unix operating system developed and distributed by the Computer Systems Research Group (CSRG) at the University of California, Berkeley, beginni ...
, and has since become a standard program in all Unix systems.
less
Less or LESS may refer to:
Computing
* less (Unix), a Unix utility program
* Less (style sheet language), a dynamic style sheet language
* Large-Scale Scrum (LeSS), a product development framework that extends Scrum
Other uses
* -less, a priv ...
, 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 op ...
versions 2 and later.
A
more
command is also part of
ASCII
ASCII ( ), an acronym for American Standard Code for Information Interchange, is a character encoding standard for representing a particular set of 95 (English language focused) printable character, printable and 33 control character, control c ...
's ''MSX-DOS2 Tools'' for
MSX-DOS
MSX-DOS is a discontinued disk operating system developed by Microsoft's Japan subsidiary for the 8-bit home computer standard MSX, and is a cross between MS-DOS v1.25 and CP/M-80 v2.2.
MSX-DOS
MSX-DOS and the extended BASIC with 3½-in ...
version 2.
The Software Link
The Software Link, Inc. (TSL) was a company in Norcross, Georgia, Norcross, Georgia (U.S. state), Georgia that developed software for personal computers from 1986 to 1994. The company was co-founded by Rod Roark and Gary Robertson.
Products
* PC ...
'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 Licenses (GNU GPL or simply GPL) are a series of widely used free software licenses, or ''copyleft'' licenses, that guarantee end users the freedom to run, study, share, or modify the software. The GPL was the first c ...
. The
FreeDOS
FreeDOS (formerly 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 system, legacy software and supporting embedded systems. FreeDOS ca ...
version was developed by
Jim Hall and is licensed under the
GPL v2. The command is also available in the
KolibriOS
KolibriOS is an open-source operating system for x86 computers, written completely in FASM assembly language. It has been developed since 2004, forked from MenuetOS, and supports i586 CPU, CPUs or newer. KolibriOS is small sized and fits on a sin ...
Shell.
The
numerical computing
Numerical analysis is the study of algorithms that use numerical approximation (as opposed to symbolic manipulations) for the problems of mathematical analysis (as distinguished from discrete mathematics). It is the study of numerical methods th ...
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, implementat ...
and
GNU Octave
GNU Octave is a scientific programming language for scientific computing and numerical computation. Octave helps in solving linear and nonlinear problems numerically, and for performing other numerical experiments using a language that is mostly ...
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 (constituenc ...
is:
more
ptions ile_name
If no file name is provided,
more
looks for input from
standard input
In computer programming, standard streams are preconnected 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 (stdin), ...
.
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 user-definable value that can affect the way running processes will behave on a computer. Environment variables are part of the environment in which a process runs. For example, a running process can query the va ...
$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 ...
* less (Unix)
less is a terminal pager Computer program, program on Unix, Microsoft Windows, 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 al ...
* 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