ls Flashcards
1
Q
ls
![](https://s3.amazonaws.com/brainscape-prod/system/cm/313/331/388/q_image_thumb.png?1591380906)
A
List information about the FILEs (the current directory by default). Sort entries alphabetically if none of -cftuvSUX nor –sort is specified.
![](https://s3.amazonaws.com/brainscape-prod/system/cm/313/331/388/a_image_thumb.png?1591380897)
2
Q
ls
- a
- l
- h
- F
- r
- R
A
- a, –all, Do not ignore entries starting with .
- l, Use a long listing format.
- h, –human-readable, With -l and -s, print sizes like 234M, 2G, etc
- F, –classify, Append indicator (one of */=>@|) to entries.
- r, –reverse, Reverse order while sorting.
- R, –recursive, List subdirectories recursively.
3
Q
ls
- s
- t
- i
- d
- n
A
- s, –size, Print allocated size of each file.
- t, Sort by modification time, newest first.
- i, –inode, Print index number of each file.
- d, –directory, List directories themselves, not their contents.
- n, –numeric-uid-gid, Like -l, but lists numeric user and group IDs.