ls_usage
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ls_usage [2022/01/10 19:46] – [sort ls output by filename length] raju | ls_usage [2022/07/22 23:34] (current) – [indicators] raju | ||
---|---|---|---|
Line 55: | Line 55: | ||
-rwx------ 1 rajulocal rajulocal 1112 20201017 / | -rwx------ 1 rajulocal rajulocal 1112 20201017 / | ||
</ | </ | ||
+ | |||
+ | ==== indicators ==== | ||
+ | "ls -F" appends indicators < | ||
+ | * * means executable. | ||
+ | * / means directory. | ||
+ | * = means socket. | ||
+ | * > means door. | ||
+ | * @ means symbolic link (or that the file has extended attributes). | ||
+ | * | means named pipe. | ||
+ | |||
+ | Ref:- https:// | ||
+ | |||
+ | ==== only show filename and modification time ==== | ||
+ | < | ||
+ | ls -al | cut -d ' ' -f 6- | ||
+ | </ | ||
+ | |||
+ | Another way (using find): | ||
+ | < | ||
+ | find -maxdepth 1 -type f -printf "%TY %Tb %Td %TH: | ||
+ | </ | ||
+ | |||
+ | To sort the files based on timestamp (reverse chronological order) | ||
+ | < | ||
+ | find -maxdepth 1 -type f -printf " | ||
+ | </ | ||
+ | |||
+ | The %T+ is used to sort the output properly and gets removed by cut afterwards. | ||
+ | |||
+ | Ref:- https:// | ||
ls_usage.1641843974.txt.gz · Last modified: 2022/01/10 19:46 by raju