Find oldest files in a directory recursively
·1 min
Small post today, just a command. I’ll start posting commands I’ve found useful under the commands
tag.
Example to find the top 5 oldest files that are named *index
recursively in a directory:
find /path/to/directory -name '*index' -type f -printf '%T+ %p\n' | sort | head -n 5
– This is day 8/100 of #100DaysToOffLoad!