Name
ls
Synopsis
ls [options] [names]
If no names are given, list the files
in the current directory. With one or more
names, list files contained in a directory
name or that match a file
name. The options let you display a variety
of information in different formats. The most useful options
include -F, -R,
-a, -l, and -s.
Some options don’t make sense together; e.g., -u
and -c.
Tip
Modern versions of ls
pay attention to the LC_COLLATE environment variable. Its
default value, en_US, (in the
United States) causes ls to
sort in dictionary order (i.e., ignoring case). You may prefer
to set LC_COLLATE to C to
restore the traditional Unix behavior of sorting in ASCII
order.
Common Options
-a,--allList all files, including the normally hidden
.files.-A,--almost-allLike
-a, but exclude . and .. (the current and parent directories).-b,--escapeShow nonprinting characters in octal.
-c,--time-ctime,--time=statusList files by inode modification time.
-C,--format=verticalList files in columns (the default format, when displaying to a terminal device).
-d,--directoryList only the directory’s information, not its contents. (Most useful with
-land-i.)-
-f Interpret each name as a directory (files are ignored).
-F,--classify,--indicator-style=classifyFlag filenames by appending
/to directories,>to doors (Solaris only),*to executable files,|to FIFOs,@to symbolic links, and=to sockets.-
-g Like
-l, but omit owner name (show group).-
-h Produce “human-readable” output, using abbreviations ...