2014-01-28 10:27:02 +01:00
|
|
|
# ls
|
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
> List directory contents.
|
2014-01-28 10:27:02 +01:00
|
|
|
|
2016-01-20 12:39:15 +01:00
|
|
|
- List files one per line:
|
2014-01-28 10:27:02 +01:00
|
|
|
|
2016-01-20 12:39:15 +01:00
|
|
|
`ls -1`
|
2014-01-28 10:27:02 +01:00
|
|
|
|
2016-01-20 12:39:15 +01:00
|
|
|
- List all files, including hidden files:
|
2014-01-28 10:27:02 +01:00
|
|
|
|
2016-01-20 12:39:15 +01:00
|
|
|
`ls -a`
|
2014-01-28 10:27:02 +01:00
|
|
|
|
2016-01-20 12:39:15 +01:00
|
|
|
- Long format list (permissions, ownership, size and modification date) of all files:
|
2014-01-28 10:27:02 +01:00
|
|
|
|
2016-01-20 12:39:15 +01:00
|
|
|
`ls -la`
|
2014-01-28 22:58:16 +01:00
|
|
|
|
2016-01-20 18:59:42 +01:00
|
|
|
- Long format list with size displayed using human readable units (KB, MB, GB):
|
2014-04-16 20:24:01 +02:00
|
|
|
|
|
|
|
`ls -lh`
|
|
|
|
|
2016-01-20 12:39:15 +01:00
|
|
|
- Long format list sorted by size (descending):
|
2014-02-21 23:05:52 +01:00
|
|
|
|
2016-01-20 12:39:15 +01:00
|
|
|
`ls -lS`
|
2016-01-27 17:31:40 +01:00
|
|
|
|
|
|
|
- Long format list of all files, sorted by modification date (oldest first):
|
2016-01-27 17:44:05 +01:00
|
|
|
|
2016-01-27 17:31:40 +01:00
|
|
|
`ls -ltr`
|