command-definition.ls.html Maven / Gradle / Ivy
For each operand that names a file of a type other than directory or symbolic
link to a directory, ls
writes the name of the file as well as any
requested, associated information. For each operand that names a file of type
directory, ls
writes the names of files contained within the
directory as well as any requested, associated information. If the -l
option is specified, for each operand that names a file of type symbolic link
to a directory, ls
writes the name of the file as well as any
requested, associated information. If the -l option is not specified,
for each operand that names a file of type symbolic link to a directory,
ls
writes the names of files contained within the directory as well
as any requested, associated information.
If no operands are specified, ls
writes the contents of the current
directory. If more than one operand is specified, ls
writes
non-directory operands first; it sorts directory and non-directory operands
separately according to the name of the file or directory.
TODO The ls
utility detects infinite loops; that is, entering a
previously visited directory that is an ancestor of the last file
encountered. When it detects an infinite loop, ls
aborts the
recursion.