LS: Difference between revisions
no edit summary
m (Protected "LS" ([Edit=Allow only logged in users] (indefinite) [Move=Allow only logged in users] (indefinite) [Delete=Allow only logged in users] (indefinite))) |
No edit summary |
||
Line 1:
[[Category:Linux]]
__TOC__
<br />
LS command is used to list the files in a directory.
*LS Color Code:
Blue = Dir
White = Files
Red = Backups
ls -F
▲| Visual Classification of Files With Special Characters || ls -F
Details:
/ = directory
ls -1
ls -a
ls -lh
| Order Files Based on Last Modified Time || ls -lt▼
*Display Directory Information
ls -ld /etc
ls -lt
ls -ltr
| To view a long list of all the files + directories and sub-directories recursively || ls -lR▼
*Display Files Recursively
| To view a list of all the files with extensions only || ls *.*▼
ls -R
| 'more' is a filter for paging through text one screenful at a time|| <nowiki>ls -a | more</nowiki>▼
ls -lR
| List file sorted by modification time || ls -t<br />ls -tr (in Reverse Order)<br />ls -lhtr (Large, Human readable, Time sort, Reverse order)▼
ls *.*
▲
ls -a | more
*List only directories
ls -l | grep ^d
*List file sorted by modification time
ls -t
ls -tr (in Reverse Order)
▲
<br />
;References
<references/>
<br />
<br />
<br />
|