home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.shrubbery.net
/
2015-02-07.ftp.shrubbery.net.tar
/
ftp.shrubbery.net
/
pub
/
pc
/
unix
/
unx.arc
/
LS.DOC
< prev
next >
Wrap
Text File
|
1985-03-19
|
3KB
|
76 lines
ls - list contents of directory
SYNOPSIS
ls [ -alrst1R ] name
DESCRIPTION
For each directory argument, ls lists the contents of the
directory; for each file argument, ls repeats its name and
any other information requested; for each drive argument, ls
lists the content of the current directory on that drive.
By default, the output is sorted alphabetically.
When no argument is given, the current directory is listed.
Directory names are marked with a trailing backslash (\).
There are a large number of options:
-l List in long format, giving mode, size in bytes,
and time of last modification for each file.
-t Sort by time modified (latest first) instead of by name.
-a List all entries; in the absence of this option, entries
with the hidden bit set, and entries whose names begin
with a period (.), are not listed.
-s Give size in bytes of each file.
-r Reverse the order of sort to get reverse alphabetic or
oldest first as appropriate.
-R recursively list subdirectories encountered.
-1 force one entry per line output format.
The mode printed under the -l option contains 6 characters
which are interpreted as follows: the first character is
d if the entry is a directory;
t if the entry is a temporary file; or
- if the entry is a plain file.
The next two characters indicate whether the file has attributes
unique to MS-DOS, as follows:
h if the file is hidden (only seen via -a);
s if the file is part of the MS-DOS kernel (system); or
- if the file is a plain file.
The next three characters indicate permission respectively
to read, to write, or to execute the file as a program. Only
the write permission bit has any real meaning; the read and
execute bits are determined by looking at the file extension
and whether the file is a directory. For a directory, `execute'
permission is interpreted to mean permission to search
the directory. The permissions are indicated as follows:
r if the file is readable;
w if the file is writable;
x if the file is executable;
- if the indicated permission is not granted.
BUGS
Newline and tab are considered printing characters in file names.
The output device is assumed to be 80 columns wide.
Multiple arguments are not allowed.
Will crash if asked to list more than about 2000 files.
Uses a bubble sort that is crushingly slow for directories with
more than 100 entries.