find / -name *.py -type f -mtime -60 -printf '%TY-%Tm-%Td %TT %p\n' 2>/dev/null | sort -r
Command/options | Explanation |
---|---|
find | Not as fast as locate but has many advantages. See locate vs find: usage, pros and cons of each other |
-name *.py | Only find python scripts |
-mtime -60 | -mtime is days |
-printf ‘%TY-%Tm-%Td %TT %p\n’ | Displays output with easy-to-read dates |
2>/dev/null | Pumps all the annoying output about lacking permissions into /dev/null i.e. ignores them |
| | Pipes output through to be sorted |
sort -r | Sort so most recent are at top |