ls.1 (2010 09)

l
ls(1) ls(1)
-i For each file, list the inode number in the first column of the report. When used in mul-
ticolumn output, the number precedes the file name in each column.
-l (ell) List in long format, giving mode, number of links, owner, group, size in bytes, and time of
last modification for each file (see further DESCRIPTION and Access Control Lists below). If
the time of last modification is greater than six months ago, or any time in the future, the year
is substituted for the hour and minute of the modification time. If the file is a special file, the
size field contains the major and minor device numbers rather than a size. If the file is a sym-
bolic link, the filename is printed, followed by
-> and the pathname of the referenced file.
Under the UNIX 2003 environment (see standards (5)),
ls with -l does not follow symbolic
links unless the
-H or -L option is specified.
-m Stream output format.
-n The same as -l, (ell) except that the owner’s UID and group’s GID numbers are printed,
rather than the associated character strings.
-o The same as -l
, (ell) except that only the owner is printed (group is omitted). (If both -l (ell)
and
-o are specified, the group is not printed).
-p Put a slash (
/) after each file name if that file is a directory.
-q List nonprinting characters in file names as the character (?).
-r Reverse the order of sort to get reverse (descending) collation or oldest first, as appropriate.
-s List size in blocks of 512-byte units, including indirect blocks, for each entry. The first entry
listed is the total number of blocks in the directory. When used in multicolumn output, the
number of blocks precedes the file name in each column. The number of indirect blocks in a
file is filesystem dependent.
-t Sort by time modified (latest first) before sorting alphabetically.
-u Use time of last access instead of last modification for sorting (-t
option) or printing (-l (ell)
option).
-x List multicolumn output with entries sorted across rather than down the page.
-A The same as -a, except that the current directory . and parent directory
.. are not listed.
For a user with appropriate privileges, this flag defaults to on, and is turned off by
-A.
-C List multicolumn output with entries sorted down the columns.
-F After each file name, put one of:
A slash (
/) if the file is a directory or a symbolic link to a directory.
An asterisk (*) if the file is executable;
An at-sign (@) if the file is a symbolic link to a file;
A vertical bar (|) if the file is a fifo.
Under the UNIX 2003 environment (see standards (5)),
ls with -F does not follow symbolic
links unless the -H or -L option is specified.
-H If a symbolic link referencing a file of type directory is specified on the command line, ls
evaluates the file information and file type to be those of the file referenced by the link, and
not the link itself. However, ls writes the name of the link itself and not the file referenced by
the link.
-L Evaluate the file information and file type for all symbolic links (whether named on the com-
mand line or encountered in a file hierarchy) to be those of the file referenced by the link, and
not the link itself. However, ls writes the name of the link itself and not the file referenced
by the link. When -L is used with -l, write the contents of symbolic links in the long format.
-R Recursively list subdirectories encountered.
-1 (one) List the file names in single column format regardless of the output device. This forces
single column format to the user’s terminal.
Specifying more than one of the options in the following mutually exclusive pairs is not considered an
error:
-C and -l (ell), -m and -l (ell), -x and -l (ell), -C and -1 (one), -H and -L, and -c and -u.
ls is known by several shorthand-version names for the various formats:
2 Hewlett-Packard Company 2 HP-UX 11i Version 3: September 2010