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, 45–46 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.
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]
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 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:
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.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.more
to count logical, rather than screen lines (i.e., long lines are not folded).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]
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
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.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
uniq
is a utility command on Unix, Plan 9, Inferno, and Unix-like operating systems which, when fed a text file or standard input, outputs the text with adjacent identical lines collapsed to one, unique line of text.
In computing, ls
is a command to list computer files and directories in Unix and Unix-like operating systems. It is specified by POSIX and the Single UNIX Specification.
The cd
command, also known as chdir
, is a command-line shell command used to change the current working directory in various operating systems. It can be used in shell scripts and batch files.
In computing, dir
(directory) is a command in various computer operating systems used for computer file and directory listing. It is one of the basic commands to help navigate the file system. The command is usually implemented as an internal command in the command-line interpreter (shell). On some systems, a more graphical representation of the directory structure can be displayed using the tree
command.
In computing, a command is a directive to a computer program to perform a specific task. It may be issued via a command-line interface or as input to a network service as part of a network protocol, or as an event triggered in a graphical user interface.
tr is a command in Unix, Plan 9, Inferno, and Unix-like operating systems. It is an abbreviation of translate or transliterate, indicating its operation of replacing or removing specific characters in its input data set.
wc
is a command in Unix, Plan 9, Inferno, and Unix-like operating systems. The program reads either standard input or a list of computer files and generates one or more of the following statistics: newline count, word count, and byte count. If a list of files is provided, both individual file and total statistics follow.
less
is a terminal pager program on Unix, Windows, and Unix-like systems used to view the contents of a text file one screen at a time. It is similar to more, but has the extended capability of allowing both forward and backward navigation through the file. Unlike most Unix text editors/viewers, less does not need to read the entire file before starting, allowing for immediate viewing regardless of file size.
tail is a program available on Unix, Unix-like systems, FreeDOS and MSX-DOS used to display the tail end of a text file or piped data.
In computing, tee
is a command in command-line interpreters (shells) using standard streams which reads standard input and writes it to both standard output and one or more files, effectively duplicating its input. It is primarily used in conjunction with pipes and filters. The command is named after the T-splitter used in plumbing.
In computing, sleep is a command in Unix, Unix-like and other operating systems that suspends program execution for a specified time.
In computing, tree
is a recursive directory listing command or program that produces a depth-indented listing of files. Originating in PC- and MS-DOS, it is found in Digital Research FlexOS, IBM/Toshiba 4690 OS, PTS-DOS, FreeDOS, IBM OS/2, Microsoft Windows, and ReactOS. A version for Unix and Unix-like systems is also available.
In computing, type is a command in various command-line interpreters (shells) such as COMMAND.COM
, cmd.exe
, 4DOS/4NT and Windows PowerShell used to display the contents of specified files on the computer terminal. The analogous Unix command is cat.
In computing, the print
command provides single-user print spooling capability in a number of operating systems. It is roughly similar to that provided by the UNIX System V lp and BSD lpr print spooler systems.
In computing, find
is a command in the command-line interpreters (shells) of a number of operating systems. It is used to search for a specific text string in a file or files. The command sends the specified lines to the standard output device.
In computing, label
is a command included with some operating systems. It is used to create, change, or delete a volume label on a logical drive, such as a hard disk partition or a floppy disk. Used without parameters, label
changes the current volume label or deletes the existing label.
In computing, help
is a command in various command line shells such as COMMAND.COM
, cmd.exe
, Bash, qshell, 4DOS/4NT, Windows PowerShell, Singularity shell, Python, MATLAB and GNU Octave. It provides online information about available commands and the shell environment.
In computing, copy
is a command in various operating systems. The command copies computer files from one directory to another.
In computing, choice
is a command that allows for batch files to prompt the user to select one item from a set of single-character choices. It is available in a number of operating system command-line shells.
A command-line interface (CLI) is a means of interacting with a computer program by inputting lines of text called command-lines. Command-line interfaces emerged in the mid-1960s, on computer terminals, as an interactive and more user-friendly alternative to the non-interactive interface available with punched cards.