|
|
|
|
|
by q_revert
5063 days ago
|
|
I know it gets talked about quite a lot round here but I find zsh really quite useful for this type of thing.. the zsh equivalent of the above, for me would be ls **/* -ltr
(Edit)[ for an exact reproduction ] ls **/*(.) -ltr
if you wanted to put a date range on it.. for example, only files from the last 5 days.. ls **/*(m-5) -ltr
or the last 5 hours ls **/*(mh-5) -ltr
there's loads more of these http://grml.org/zsh/zsh-lovers.html, obviously your shell is a matter of preference, and if you know bash or something similar well enough then the incentive to change is obviously lessened.. but personally I've found that a whole series of small improvements (for me) added up to a pretty large winedit: as pointed out by pyre, my initial suggestion isn't an exact replica.. but was the first thing that came to mind for me.. i guess s/the\ zsh\ equivalent/something\ similar\ in\ zsh/ edit again: /tmp/ $ mkdir -p /tmp/test1/test2/test3
/tmp/ $ touch /tmp/test1/test2/test3/test4
/tmp/ $ ls -ltr /tmp/test1/**/*(.)
-rw-r--r-- 1 usr grp 0 Aug 7 15:49 /tmp/test1/test2/test3/test4
/tmp/ $ find /tmp/test1 -type f -print0 | xargs -0 ls -ltr
-rw-r--r-- 1 usr grp 0 Aug 7 15:49 /tmp/test1/test2/test3/test4
|
|