ls_usage
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
ls_usage [2022/07/22 23:27] – [Show file date in different date formats] raju | ls_usage [2022/07/22 23:34] (current) – [indicators] raju | ||
---|---|---|---|
Line 66: | Line 66: | ||
Ref:- https:// | 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.1658532458.txt.gz · Last modified: 2022/07/22 23:27 by raju