ls

Displays information about one or more files

ls [options] [file-list]

The ls utility displays information about one or more files. It lists the information alphabetically by filename unless you use an option to change the order.

Arguments

When you do not use an argument, ls displays the names of the visible files in the working directory (those files whose filenames do not begin with a period [.]).

The file-list contains one or more pathnames of files. You can use the pathname of any ordinary, directory, or device file. These pathnames can include ambiguous file references.

When you specify a directory, ls displays the contents of the directory. It displays the name of the directory only when needed to avoid ambiguity, such as when more ...

Get A Practical Guide to Red Hat® Linux® 8 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.