Difference between revisions of "LS"
Jump to navigation
Jump to search
Line 12: | Line 12: | ||
|- | |- | ||
| -a | | -a | ||
− | |List | + | |List files including hidden. |
|- | |- | ||
| -d | | -d | ||
Line 30: | Line 30: | ||
|} | |} | ||
− | == Examples == | + | ==Examples== |
− | + | 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 |
Latest revision as of 15:12, 7 June 2020
Contents
Description
The ls command is used to list the contents of a directory.
Structure
ls <options> <path/file>
Options
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. |
Examples
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