The more command displays files one page at a time.
It obtains the number of lines per page from the environment or
If more than one file is specified, they are displayed one at a time. When more finishes displaying one file, it begins displaying the next one in the list. If you give - as one of the file names, more reads the standard input at that point in the sequence.
more allows paging forwards and backwards (if possible) and searching for strings.
Besides normal ASCII text files, these utilities also work on
UTF-8 files and 16-bit wide Unicode files. Such files normally begin with
a multiple-byte marker indicating whether the file's contents are Unicode
big-endian, Unicode little-endian, or UTF-8. Such files are detected
automatically by these utilities; however, when the multiple-byte
marker is missing you can use the
Normally, the output format of these utilities defaults to the format
of the first file it displays unless the
causes the display of all characters, including unprintable ones. Normally unprintable characters are displayed in a printable format. Further, ANSI escape sequences for display modes are processed. This option cannot be used with
The character in the top left corner of the screen always appears in normal mode.
clears the screen before displaying a new file. If at any time, the new screen to be displayed does not have any lines in common with the current screen, more does not scroll, but instead, redraws the screen one line at a time, starting from the top. more may ignore this option if the terminal does not support such operations.
exits immediately after displaying the last line of the last file. Normally, if standard output is a terminal device, more stops after displaying the last line of the last file and prompts for a new command. If the command that displays text causes more to reach the end of the file again, more exits.
ignores case during searches.
specifies the number of lines per page. This overrides any values obtained from the environment.
sets the prompt that appears at end of each page of text to string. The default prompt is [filename]. more normally displays the prompt in STANDOUT mode.
initially executes the more command on each file. If it executes successfully and command is a positioning command such as a line number or a regular expression search, more displays the resulting page; otherwise more displays the first page of the file. If both the
-tand -poptions are specified, the -toption is processed first. -S
displays the prompt in normal mode rather than STANDOUT mode.
replaces consecutive empty lines with a single empty line. Remember that all line numbers (for example, as specified with the
p) will refer to the lines in the new file (that is, the file with the consecutive empty lines replaced). -ttag
searches for the named tag and displays the page of text containing it. See ctags for more information.
-U[[[ c][ lb8oa]][ p[ lb8oa]]]
specifies the input format of any file missing the initial multiple-byte marker, the output format produced, or both.
cis specified, the specifiers that follow it apply to the input consumed.
pis specified, the specifiers that follow it apply to the output produced.
cnor pare specified, the remaining -Uspecifiers apply to the input consumed.
cand pare specified, the remaining -Uarguments apply to both input and output.
The remaining specifiers indicate the format of the characters read from input or written to output (as determined by
cand p): llittle-endian 16-bit wide characters bbig-endian 16-bit wide characters 8UTF-8 characters aASCII characters from the ANSI code page oASCII characters from the OEM code page
When multiple format specifiers can be associated with either c or p, the last appropriate one given on the command for each of c and p is used. For example:
is the same as:
When a p specifier is given without a c specifier and format specifiers are given before the p specifier, those format specifiers apply to the input. For example:
is the same as:
When c or p is specified with no format specifies, little endian 16-bit wide characters are used by default for either input or output, as appropriate.
As an alternative to specifying formats for both input and output with the same
-Uoption, you can specify the -Uoption multiple times. For example, the following are identical: -Uca -Upb -Ucapb
-Uspecifiers are actually case-insensitive. For example, the following are all identical in their behavior: -Ucl -UcL -UCl -UCL -u
displays all backspaces as ^H. Normally characterbackspace_(underscore) displays character as underlined and characterbackspacecharacter displays character as bold-faced.
-ualso displays all carriage returns as ^M. This option cannot be used with -A.
more also accepts the following interactive commands.
moves backward n lines, with a default of one page. If n is more than the page size, more displays only the final page.
scrolls forward n lines, with a default of one half of the page size. If you specify n, it becomes the new default for subsequent d and u commands.
moves forward n lines, with a default of one page. At end-of-file, more continues with the next file in the list, or exits if the current file is the last one in the list.
goes to the nth line in the file. If you do not specify n, more advances to the end of the file.
goes to the nth line in the file, with the default being the first line of the file.
displays a summary of interactive commands.
scrolls forward n lines, with a default of one line for j, ENTER and ↓, and a default of one page for SPACE. This command displays the entire n lines even if n is more than the page size. At end-of-file, these commands cause more to begin displaying the next file in the list, or to exit if the current file is the last one in the list.
scrolls backward n lines, with a default of one line. This command displays the entire n lines even if n is more than the page size.
marks the current position with the lowercase letter. When you view a new file, all previous marks are lost.
repeats the previous search, but in the opposite direction. If you specify n, more repeats the search n times.
repeats the previous search. If you specify n, more repeats the search n times.
For example, if there are eight occurrences of pattern in the file and /pattern found the second occurrence, a follow-up command of 5n finds and sets the current position to the 7th occurrence of pattern.
refreshes the screen and discards any buffered input.
refreshes the screen.
skips forward n lines (with a default of one line) and displays one page beginning at that point. If n would cause less than a full page to be displayed, more displays the last page in the file.
scrolls backward n lines, with a default of one half of the page size. If you specify n, it becomes the new default for subsequent d and u commands.
invokes an editor to edit the current file. more uses the editor named by the environment variable EDITOR. The default editor is vi.
returns to the position marked with letter.
returns to the position where you last issued a movement command of greater than one page or the beginning of the file if you have issued no such commands.
- :e [filename]ENTER
stops viewing the current file and views filename instead. If you do not specify filename, more returns to the beginning of the current file. If filename is #, more returns to the last file viewed before the current one.
views the next file from the list given on the command line. If you specify n, more views the nth next file from the list.
views the previous file from the list given in the command line. If you specify n, more views the nth previous file from the list.
- :t tagname
goes to tagname (see ctags).
- :w filename
writes the contents of the current file to the file filename.
escapes to shell and executes sh_cmd as a shell command.
displays, where possible, the name of the file currently being viewed, its number (relative to the total number of files specified in the command line), the current line number, the current byte number, the total bytes to display and what percentage of the file has been displayed.
searches forward in the file for the nth line containing pattern. n defaults to one if not specified. If pattern is the null regular expression (/), more uses the previous pattern. If the character ! precedes pattern, more searches for lines that do not contain pattern.
searches backward in the file for the nth line containing pattern. The search begins at the line immediately before the top line displayed. n defaults to one if not specified. If pattern is the null regular expression (?), more uses the previous pattern. If the character ! precedes pattern, more searches for lines that do not contain pattern.
goes to the first line in the file.
goes to the last line in the file.
contains the maximum number of columns to display on one line.
contains the name of the editor that the v command invokes.
contains the number of lines in a page. This value takes precedence over the value provided by TERM; however, the
-nvalue takes precedence over the LINES value.
contains a list of options (from those listed in the Options section) as they would appear on the command line. This variable takes preference over the TERM and LINES variables.
contains the name of the terminal type.
Sets the default output format. Normally the format of the first file read is used as the default output format. The value must be one of those listed in the File Character Formats section of the unicode reference page.
Possible exit status values are:
Failure due to any of the following:
POSIX.2. x/OPEN Portability Guide 4.0. All UNIX systems. Windows 7. Windows Server 2008 R2. Windows 8. Windows Server 2012. Windows 10. Windows Server 2016.
The MKS more command should not be confused with any more commands supplied with your operating system.
PTC MKS Toolkit for Power Users
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
PTC MKS Toolkit 10.1 Documentation Build 15.