ls \- list contents of directory
For each directory argument,
lists the contents of the directory;
repeats its name and any other information requested.
The output is sorted alphabetically by default.
When no argument is given, the current directory is listed.
When several arguments are given,
the arguments are first sorted appropriately,
but file arguments appear
before directories and their contents.
There are several options:
List in long format, giving mode, number of links, owner,
size in bytes, and time of last modification
If the file is a special file the size field will instead contain
the major and minor device numbers.
Sort by time modified (latest first) instead of
List all entries; usually
including indirect blocks, for each entry.
If argument is a directory, list only its name, not
its contents (mostly used with
Reverse the order of sort to get reverse alphabetic
or oldest first as appropriate.
Use time of last access instead of last
Use time of last modification to inode (mode, etc.)
instead of last modification to file for sorting
Print i-number in first column
of the report for each file listed.
Force each argument to be interpreted as a directory
and list the name found in each slot.
the order is the order in which entries
Give group ID instead of owner ID in long listing.
The mode printed under the
option contains 11 characters
if the entry is a directory;
if the entry is a block-type special file;
if the entry is a character-type special file;
if the entry is a plain file.
The next 9 characters are interpreted
as three sets of three bits each.
The first set refers to owner permissions;
the next to permissions to others in the same user-group;
and the last to all others.
Within each set the three characters indicate
permission respectively to read, to write, or to
execute the file as a program.
For a directory, `execute' permission is interpreted
to mean permission to search the directory
The permissions are indicated as follows:
if the file is executable;
if the indicated permission is not granted.
The group-execute permission character is given
if the file has set-group-ID mode;
likewise the user-execute permission character is given
if the file has set-user-ID mode.
The last character of the mode (normally `x' or `\-') is
if the 1000 bit of the mode is on.
for the meaning of this mode.
When the sizes of the files in a directory
are listed, a total count of blocks,
including indirect blocks is printed.
/etc/passwd to get user ID's for
/etc/group to get group ID's for