ls(1)

ls(1)

LC_CTYPE determines which characters are classi®ed as nonprinting for the -band -qoptions, and the interpretation of single- and/or multibyte characters within ®le names.

LC_TIME determines the date and time strings output by the -g, -l(ell), -n, and -ooptions.

LC_MESSAGES determines the language in which messages (other than the date and time strings) are displayed.

If any internationalization variable contains an invalid setting, they all default to C (see environ(5)).

International Code Set Support

Single- and multibyte character code sets are supported.

RETURN VALUE

ls exits with one of the following values:

0All input ®les were listed successfully.

>0 ls was aborted because errors occurred when accessing ®les. The following conditions cause an error:

Speci®ed ®le not found.

User has no permission to read the directory.

Process could not get enough memory.

Invalid option speci®ed.

EXAMPLES

Print a long listing of all the ®les in the current working directory (including the ®le sizes). List the most recently modi®ed (youngest) ®le ®rst, followed by the next older ®le, and so forth, to the oldest. Files whose names begin with a . are also printed.

ls -alst

WARNINGS

Setting options based on whether the output is a login (tty) device is undesirable because ls -sis very different from ls -s lp. On the other hand, not using this setting makes old shell scripts that used ls almost inevitably fail.

Nonprinting characters in ®le names (without the -bor -qoption) may cause columnar output to be misaligned.

DEPENDENCIES

NFS

The -l(ell) option does not display a plus sign (+) after the access permission bits of networked ®les to represent existence of optional access control list entries.

AUTHOR

ls was developed by AT&T, the University of California, Berkeley and HP.

FILES

For group IDs for -l(ell) and -g.

/etc/group

/etc/passwd

For user IDs for -l(ell) and -o.

/usr/share/lib/terminfo/?/*

For terminal information.

SEE ALSO

chmod(1), ®nd(1), getacl(1), lsacl(1), stat(2), acl(5), aclv(5).

STANDARDS CONFORMANCE

ls: SVID2, SVID3, XPG2, XPG3, XPG4, POSIX.2

l

HP-UX Release 11i: December 2000

− 4 −

Section 1483