find . -type f -exec stat --format '%Y :%y %n' {} \; | sort -nr | cut -d: -f2- | head
However, this will miss some folders if the folders are symoblic links. So in this case we could specify find to follow symbolic links.
find -L . -type f -exec stat --format '%Y :%y %n' {} \; | sort -nr | cut -d: -f2- | head
Fourther more, if you just want to get files modified in last a few days, it's build in in find:
find . -mtime n
list files that modified n*24 hours ago.
No comments:
Post a Comment