Find Recently Modified Files with find -mtime

find -mtime/-mmin locates files changed within a time window, and -exec acts on them in one pass.

LinuxmtimesearchfindLow risk
Run `find /path -type f -mtime -3` to list files modified in the last 3 days (use `-mmin -30` for the last 30 minutes).

01Command

Command
$ find . -type f -mtime -3 -exec ls -lh {} +

02What it does

The sign is the part everyone forgets: `-mtime -3` means less than 3 days ago, `-mtime +3` more than 3 days ago, and plain `-mtime 3` exactly the 3rd day. `-exec ... {} +` batches many files per command invocation (faster than `{} \;`), while `-exec ... {} \;` runs once per file when the command needs a single argument. Time-window filtering pairs well with `-size +100M` or `-name '*.log'` to narrow the sweep.

03Risk

RiskLow risk
Requirementsfindutils (default)

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • find(1) - Linux manual page
    man7.org · technical · 2026-09-17
    Evidence: -mtime n tests files whose data was last modified n*24 hours ago; -mmin tests minutes; -exec executes a command on matches, with {} + batching efficiently.

Last verified: 2026-09-17 · Category: Files & Folders