mirror of https://github.com/CrimsonTome/tldr.git
31 lines
410 B
Markdown
31 lines
410 B
Markdown
# ls
|
|
|
|
> List directory contents
|
|
|
|
- List all files, even hidden
|
|
|
|
`ls -a`
|
|
|
|
- List all file names (no extra info)
|
|
|
|
`ls -A1`
|
|
|
|
- List all files with their rights, groups, owner
|
|
|
|
`ls -ls`
|
|
|
|
- List all files with a prefix/suffix
|
|
|
|
`ls {{prefix}}*`
|
|
`ls *{{suffix}}`
|
|
|
|
- Sort the results size
|
|
|
|
`ls -s # by size`
|
|
`ls -t # by last modified date`
|
|
`ls -U # by creation date`
|
|
|
|
- Reverse the order of the results
|
|
|
|
`ls -r`
|