LS(1)

NAME
ls - list directory contents

SYNOPSIS
ls [-iqr] [-ln] [-A | -a] [-1] [-h | -F | -p] [-H | -L] [-R | -d] [-S | -f | -t | -U] [-c | -u] [file ...]

DESCRIPTION
ls lists each given file, and the contents of each given directory. If no files are given the current directory is listed.

OPTIONS

-A  List all entries except for '.' and '..'.

-a  Show hidden files (those beginning with '.').

-c  Use time file's status was last changed instead of last modification time for sorting or printing.

-d  List directories themselves, not their contents.

-F  Append a file type indicator to all special files.

-f  Like -U but turns on -a and disables -r, -S and -t.

-H  List information about the targets of symbolic links specified on the command line instead of the links themselves.

-h  Show filesizes in human-readable format.

-i  Print the index number of each file.

-L  List information about the targets of symbolic links instead of the links themselves.

-l  List detailed information about each file, including their type, permissions, links, owner, group, size or major and minor numbers if the file is a character/block device, and last file status/modification time.

-n  List detailed information about each file, including their type, permissions, links, owner, group, size or major and minor numbers if the file is a character/block device, and last file status/modification time, but with numeric IDs.

-p  Append a file type indicator to directories.

-q  Replace non-printable characters in filenames with '?'.

-R  List directory content recursively. The -1 flag is set implicitly.

-r  Reverse the sort order.

-S  Sort files by size (in decreasing order).

-t  Sort files by last file status/modification time instead of by name.

-U  Keep the list unsorted.

-u  Use file's last access time instead of last modification time for sorting or printing.

SEE ALSO
stat(2)

STANDARDS
The ls utility is compliant with the p1003.1-2013 specification except from the [-Ckmpsx] flags.

The [-hU] flags are an extension to that specification.