tldr/common/ls.md

27 lines
342 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`