tldr/common/ls.md

27 lines
342 B
Markdown
Raw Normal View History

2014-01-28 09:27:02 +00:00
# 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`
2014-01-28 21:58:16 +00:00
- List all files with a prefix/suffix
2014-01-28 22:41:12 +00:00
`ls {{prefix}}*` or `ls *{{suffix}}`
2014-01-28 21:58:16 +00:00
- Sort files by time
`-t` for last modified
2014-01-28 21:58:16 +00:00
`-U` for date of creation
`-r` reverses the list
`ls -tr`