From Void-Byte
Revision as of 15:12, 7 June 2020 by Bgrambo (talk | contribs) (→‎Examples)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


The ls command is used to list the contents of a directory.


ls <options> <path/file>


Option Description
-a List files including hidden.
-d List directories, but omit contents.
-h Human readable format.
-l Long listing format.
-R List all files in directories recursively.
-t Sort by time of file in numerical order.


List files in the current directory in long listing format and human readable.

ls -alh

List files in the current directory and the contents of directories in numerical order by modify date/time.

ls -tR