find -mmin: Select Files by Minutes
find -mmin selects files by modification age measured in minutes.
When days are too coarse, -mmin pinpoints what changed in the last few minutes, for example artifacts a build step just produced.
What it does
find -mmin N matches files modified exactly N minutes ago; +N means more than N minutes ago and -N means within the last N minutes. It is the minute-granularity counterpart to -mtime.
Common usage
find dist -type f -mmin -10 # built in the last 10 minutes
find /tmp -type f -mmin +60 -delete
find . -type f -amin -5 # accessed in last 5 minutesOptions
| Expression | What it does |
|---|---|
| -mmin +N | Modified more than N minutes ago |
| -mmin -N | Modified within the last N minutes |
| -mmin N | Modified exactly N minutes ago |
| -amin / -cmin | Access / inode-change time in minutes |
In CI
Use -mmin -N to capture exactly the files a previous step just wrote, which is handy for collecting fresh artifacts without listing the whole tree. The sign convention matches -mtime: minus for recent, plus for old.
Common errors in CI
-mmin, -amin, and -cmin are GNU extensions and are not in classic BSD find; macOS ships BSD find but does support -mmin, so it usually works on Mac runners. If a script must be portable to a minimal BSD, fall back to -newer against a touched reference file.