Find files modified recently
| 1 min read
Sometimes you just need to know what changed in a folder over the last few days, especially when jumping back into a project after a break.
find . -type f -mtime -7
-mtime -7 means “modified less than 7 days ago”. Tweak the number to your liking. -mtime +30 flips it to “older than 30 days” which is handy for cleanup.
Filter by extension to cut the noise:
find . -type f -mtime -7 -name "*.ts"
Or combine a few:
find . -type f -mtime -1 \( -name "*.ts" -o -name "*.tsx" \)
Pipe into ls -lt if you want timestamps and sizes alongside the path:
find . -type f -mtime -7 -exec ls -lt {} +
That’s it. No fancy tools, just find doing what it does.