mirror of https://github.com/CrimsonTome/tldr.git
27 lines
343 B
Markdown
27 lines
343 B
Markdown
# ls
|
|
|
|
> List directory contents
|
|
|
|
- List all files, even hidden
|
|
|
|
`ls -a`
|
|
|
|
- Sorting by size
|
|
|
|
`ls -s`
|
|
|
|
- List all files with their rights, groups, owner
|
|
|
|
`ls -ls`
|
|
|
|
- List all files with a prefix/suffix
|
|
|
|
`ls {{prefix}}*` or `ls *{{suffix}}`
|
|
|
|
- Sort files by time
|
|
|
|
`-t` for last modified
|
|
`-U` for date of creation
|
|
`-r` reverses the list
|
|
`ls -tr`
|