watch --color 'find -type f -print0 | perl -0e '\''print join chr(0), splice @{[ sort {-M $a <=> -M $b} map {chomp; $_} <> ]}, 0, 200'\'' | xargs -0 ls --color=always -UldF 2>/dev/null' # if --color isn't supported watch 'find -type f -print0 | perl -0e '\''print join chr(0), splice @{[ sort {-M $a <=> -M $b} map {chomp; $_} <> ]}, 0, 200'\'' | xargs -0 ls -UldF 2>/dev/null'
find -type f -print0 | perl -0e 'print join chr(0), splice @{[ sort {-M $a <=> -M $b} map {chomp; $_} <> ]}, 0, 40' | xargs -0 ls --color -UldF 2>/dev/null
find -mmin -60 # find files modified less than 60 minutes ago find -mtime -1 # find files modified less than 1 day ago find -newer ./ref # find files that are newer than the specified file
To sort by last modified:
tree -tC
perl -MFile::Find -le 'find sub{print $File::Find::name if (-M) < 60/1440},"."' # or on Windows: perl.exe -MFile::Find -le "find sub{print $File::Find::name if (-M) < 60/1440},'.'"
The '60' there is the maximum age in minutes. Another way:
# everywhere
find2perl -mtime -1 -type f -print | perl
find2perl -eval "(-M) < 60/1440" -type f -print | perl
If you have Windows + StrawberryPerl, you can also:
dir /s/b | perl -nle "print if (-M) < 60/1440"
To sort by last modified:
perl -MFile::Find -le '$\=chr 0;find sub{print "$File::Find::name" if (-M) < 1},"."' | xargs -0 -- ls -dlrtF # on Windows perl -MFile::Find -le "find sub{push@a,$File::Find::name},'.';print join qq[\n],sort{-M$b<=>-M$a}@a" # that same one, on Unix perl -MFile::Find -le 'find sub{push@a,$File::Find::name},".";print join qq[\n],sort{-M$b<=>-M$a}@a'