HP-UX Reference (11i v1 05/09) - 1 User Commands A-M (vol 1)

l
ls(1) ls(1)
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" (save text image) bit is set (see the
description of S_ISVTX in chmod(2)).
T Deny execute (search directory) permission to others. The "sticky" (save text image) 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.
Access Control Lists (ACLs)
If a file has optional ACL entries, the -l (ell) option displays a plus sign (+) after the file’s permissions.
The permissions shown are a summary representation of the file’s access control list, as returned by
stat() in the st_mode field (see stat(2)). To list the contents of an access control list, use the lsacl
command (see lsacl(1) and acl(5)) for HFS file systems, or the getacl command (see getacl(1) and aclv(5))
for JFS file systems.
EXTERNAL INFLUENCES
Environment Variables
If the COLUMNS variable is set, ls uses the width provided in determining positioning of columnar output.
LANG determines the locale to use for the locale categories when both LC_ALL and the corresponding
environment variable (beginning with LC_) do not specify a locale. If LANG is not set or is null, it defaults
to C (see lang(5)).
LC_COLLATE determines the order in which the output is sorted.
Section 1502 Hewlett-Packard Company 3 HP-UX 11i Version 1: September 2005