HP-UX Reference (11i v3 07/02) - 1 User Commands A-M (vol 1)
l
ls(1) ls(1)
l is equivalent to ls -m
ll
is equivalent to ls -l (ell)
lsf is equivalent to ls -F
lsr
is equivalent to ls -R
lsx
is equivalent to ls -x
The shorthand notations are implemented as links to
ls. Option arguments to the shorthand versions
behave exactly as if the long form above had been used with the additional arguments.
Mode Bits Interpretation (-l option)
The mode printed in listings produced by the
-l (ell) option consists of 10 characters, for example,
-rwxr-xr-x.
The first character indicates the entry type:
b Block special file
c Character special file
d Directory
l Symbolic link
n Network special file
p Fifo (also called a "named pipe") special file
s Socket
- Ordinary file
The next 9 characters are interpreted as three sets of three characters each which identify access and exe-
cution permissions for the owner, group, and others categories, as described in chmod(1). The - indicates
the permission is not granted. The various permissions can be put together in any combination, except that
the
x, s, S, t, and T characters are mutually exclusive, as implied below.
-r-------- Read by owner
--w------- Write by owner
---x------ Execute (or search directory) by owner; do not set user ID on execution
---s------ Execute/search by owner; set user ID on execution
---S------ No execute/search by owner; set user ID on execution
----r----- Read by group
-----w---- Write by group
------x--- Execute/search by group; do not set group ID on execution
------s--- Execute/search by group; set group ID on execution
------S--- No execute/search by group; set group ID on execution
-------r-- Read by others
--------w- Write by others
---------x Execute/search by others; do not set sticky bit on execution
---------t Execute/search by others; set sticky bit on execution
---------T No execute/search by others; set sticky bit on execution
The mode characters are interpreted as follows:
- Deny all permissions in the corresponding position.
r Grant read permission to the corresponding user class.
w Grant write permission to the corresponding user class.
x Grant execute (or search in directory) permission to the corresponding user class.
s Grant execute (search) permission to the corresponding user class. Execute the file as if by the
owner (set user ID, SUID) or group (set group ID, SGID), as indicated by position.
S Deny execute (search) permission to the corresponding user class. Execute the file as if by the
owner (set user ID, SUID) or group (set group ID, SGID), as indicated by position.
t Grant execute (search) permission to others. The "sticky" bit is set (see the description of
S_ISVTX in chmod(2)).
T Deny execute (search directory) permission to others. The "sticky" bit is set.
When an option is specified that results in a listing of directory and/or file sizes in bytes or blocks (such as
the -s or -l (ell) option), a total count of blocks, including indirect blocks, is also printed at the beginning
of the listing.
608 Hewlett-Packard Company − 3 − HP-UX 11i Version 3: February 2007