LIST - Display a file
Purpose: Display a file, with forward and backward paging and
scrolling.
Format: LIST [/A:[[-]rhsda] /H /I /R /S /T /W /X] file ...
file : A file or list of files to display.
/A: (Attribute select) /S(tandard input)
/H(igh bit off) /T (search for Text)
/I(gnore wildcards) /W(rap)
/R(everse) /X (heX display mode)
See also: TYPE.
File Selection
Supports extended wildcards, ranges, multiple file names, and include
lists.
Usage
LIST provides a fast and flexible way to view a file, without the
overhead of loading and using a text editor.
For example, to display a file called MEMO.DOC:
[c:\] list memo.doc
LIST is most often used for displaying ASCII text files. It can be used
for other files which contain non-alphabetic characters, but you may need
to use hex mode (see below) to read these files.
LIST uses the cursor pad to scroll through the file. The following keys
have special meanings:
Home Display the first page of the file.
End Display the last page of the file.
Esc Exit the current file.
Ctrl-PgUp Display previous file.
Ctrl-PgDn Display next file.
Ctrl-C Quit LIST.
PgUp Scroll up one page.
PgDn or Space Scroll down one page.
^ Scroll up one line.
v Scroll down one line.
Scroll left 8 columns.
> Scroll right 8 columns.
Ctrl Scroll left 40 columns.
Ctrl > Scroll right 40 columns.
F1 Display online help
B Go back one file to the previous file in the
current group of files.
Ctrl-F Prompt and search for a string, searching backward
from the end of the file.
F Prompt and search for a string.
G Go to a specific line, or, in hex mode, to a
specific hexadecimal offset.
H Toggle the "strip high bit" (/H) option.
I Display information on the current file (the full
name, size, date, and time).
N Find next matching string.
Ctrl-N Find previous match in the file.
P Print the current page or the entire file.
W Toggle the "line wrap" (/W) option.
X Toggle the hex-mode display (/X) option.
Text searches performed with F, N, Ctrl-F, and Ctrl-N are not
case-sensitive. However, if the display is currently in hexadecimal mode
and you press F or Ctrl-F, you will be prompted for whether you want to
search in hexadecimal mode. If you answer Y, you should then enter the
search string as a sequence of 2-digit hexadecimal numbers separated by
spaces, for example 41 63 65 (these are the ASCII values for the string
"Ace"; see ASCII for a complete list of ASCII codes). Hexadecimal
searches are case-sensitive, and search for exactly the string you enter.
When the search string is found LIST displays the line containing the
string at the top of the screen, and highlights the string it found. Any
additional occurrences of the string on the same display page are also
highlighted. Highlighting is intended for use with text files; in binary
files the search string will be found, but may not be highlighted
properly.
You can use wildcards in the search string. For example, you can search
for the string "to*day" to find the next line which contains the word
"to" followed by the word "day" later on the same line, or search for the
numbers "101" or "401" with the search string "[14]01". If you begin the
search string with a back-quote [`], or enclose it in back-quotes,
wildcard characters in the string will be treated as normal text with no
special wildcard meaning.
LIST saves the search string used by F, N, Ctrl-F, and Ctrl-N so you can
LIST multiple files and search for the same string simply by pressing N
in each file, or repeat your search the next time you use LIST.
You can use the /T switch to specify search text for the first file.
When you do so, LIST begins a search as soon as the file is loaded. Use
/I to ignore wildcards in the initial search string, and /R to make the
initial search go backwards from the end of the file. When you LIST
multiple files with a single LIST command, these switches affect only the
first file; they are ignored for the second and subsequent files.
You can use the G key to go to a specific line number in the file (or to
a specified hexadecimal offset in hex mode). LIST numbers lines
beginning with 1, unless ListRowStart is set to 0. A new line is counted
for every CR or LF character (LIST determines automatically which
character is used for line breaks in each file), or when line length
reaches 511 characters, whichever comes first.
LIST normally allows long lines in the file to extend past the right edge
of the screen. You can use the horizontal scrolling keys (see above) to
view text that extends beyond the screen width. If you use the W command
or /W switch to wrap the display, each line is wrapped when it reaches
the right edge of the screen, and the horizontal scrolling keys are
disabled.
To view text from the clipboard, use CLIP: as the file to be listed.
CLIP: will not return any data unless the clipboard contains text. See
Redirection for additional information on CLIP:.
If you print the file which LIST is displaying, the print format will
match the display format. If you have switched to hexadecimal or wrapped
mode, that mode will be used for the printed output as well. If you
print in wrapped mode, long lines will be wrapped at the width of the
display. If you print in normal display mode without line wrap, long
lines will be wrapped or truncated by the printer, not by LIST.
Printed output normally goes to device LPT1. If you wish to send the
printed output to another device, use the Commands page of the OPTION
dialogs, or the Printer directive in CMD.INI.
If you specify a directory name instead of a filename as an argument,
LIST will display each of the files in that directory.
Most of the LIST keystrokes can be reassigned with .INI file key mapping
directives.
You can set the colors used by LIST on the Commands page of the OPTION
dialogs, or the ListColors and ListStatBarColors directives in the .INI
file. If ListColors is not used, the LIST display will use the current
default colors. If ListStatBarColors is not used, the status bar will
use the reverse of the LIST display colors.
By default, LIST sets tab stops every 8 columns. You can change this
behavior on the Display page of the OPTION dialogs, or with the TabStops .
INI file directive.
Options
/A: (Attribute select) Select only those files that have the
specified attribute(s) set. Preceding the attribute character
with a hyphen [-] will select files that do not have that
attribute set. The colon [:] after /A is required. The
attributes are:
R Read-only
H Hidden
S System
D Subdirectory
A Archive
If no attributes are listed at all (e.g., LIST /A: ...), LIST will select
all files and subdirectories including hidden and system files. If
attributes are combined, all the specified attributes must match for a
file to be selected. For example, /A:RHS will select only those files
with all three attributes set.
/H:(High bit off) Strip the high bit from each character before
displaying. This is useful when displaying files created by some word
processors that turn on the high bit for formatting purposes. You can
toggle this option on and off from within LIST with the H key.
/I:(Ignore wildcards) Only meaningful when used in conjunction with the
/T "text" option. Directs LIST to interpret characters such as *, ?, [,
and ] as literal characters instead of wildcard characters. /I affects
only the initial search started by /T, not subsequent searches started
from within LIST.
/R:(Reverse) Only meaningful when used in conjuction with the /T "text"
option. Directs LIST to search for text from the end of the file instead
of from the beginning of the file. Using this switch can speed up
searches for text that is normally near the end of the file, such as a
signature. /R affects only the initial search started by /T, not
subsequent searches started from within LIST.
/S:(Standard input) Read from standard input rather than a file. This
allows you to redirect command output and view it with LIST. Normally,
LIST will detect input from a redirected command and adjust
automatically. However, you may find circumstances when /S is required.
For example, to use LIST to display the output of DIR you could use
either of these commands:
[c:\] dir | list
[c:\] dir | list /s
/T:(Text) Search for text in the first file. This option is the same as
pressing F, but it allows you to specify the search text on the command
line. The text must be contained in quotation marks if it contains
spaces, punctuation, or wildcard characters. For example, to search for
the string CMD.EXE in the file README.DOC, you can use this command:
[c:\] list /tCMD.EXE readme.doc
The search text may include wildcards and extended wildcards. For
example, to search for the words Hello and John on the same line in the
file LETTER.DAT:
[c:\] list /t"Hello*John" letter.dat
When you LIST multiple files with a single LIST command, /T only
initiates a search in the first file. It is ignored for the second and
subsequent files. Also see /I and /R.
/W:(Wrap) Wrap the text at the right edge of the screen. This option is
useful when displaying files that don't have a carriage return at the end
of each line. The horizontal scrolling keys do not work when the display
is wrapped. You can toggle this option on and off from within LIST with
the W key.
/X(heX mode): Display the file in hexadecimal (hex) mode. This option is
useful when displaying executable files and other files that contain non-
text characters. Each byte of the file is shown as a pair of hex
characters. The corresponding text is displayed to the right of each
line of hexadecimal data. You can toggle this mode on and off from
within LIST with the X key.
Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs