brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: find -mmin -30 lists the files that changed in the last half hour

Find
~/tips/tip-find-mmin-recent-changes

find /etc -type f -mmin -30

Lists the files that were modified within the last number of minutes.

After a deploy or a strange incident I want to know what was touched recently. Minutes are a finer tool than days.

find /etc -type f -mmin -30
find /var/www -type f -mmin -5 -printf '%TT %p\n'

-mmin -30 matches files modified less than 30 minutes ago, and +30 matches files older than that. -printf '%TT %p\n' adds the modification time to every hit. The test looks at the content modification time, so a file that only had its permissions changed is not listed. Use -cmin for that.

Further reading: find manual page

More Find tips find / -maxdepth 1 -fstype proc find /backup -name '*.gz' ! -exec gzip -t {} \; -print 2>/dev/null find /srv/downloads -type f -size +100M -size -1G -exec ls -lh {} + find /srv/data -depth -print find /srv -xdev -samefile /srv/downloads/movie.mkv All Find tips (46) All topics

Link