Find files modified in the last 24 hours
Build a paste-ready command, then review its compatibility and effects before running it.
find . -type f -mtime -1read-onlyno known side effects Compatibility
Linux + macOSVerified for Linux, macOS using posix, bash, zsh syntax.
Operational knowledgereview due 2027-01-19
Requirementsfindfind must be installed and available on PATH.
Version supportfind Current supported releasesVerified for linux, macos using posix, bash, zsh syntax; consult compatibility notes for platform-specific differences.
Expected signals./logs/app.logRepresentative successful output; values vary with the selected target and system state.
Known errorsfind: command not foundfind is missing or is not available on PATH.
Verifyfind . -type f -mtime -1The output matches the expected target and exits without an error.Rollback noteNot required: this command is read-only and does not change system state.
Command breakdown
01find .Search from hereWalks the current directory and its descendants.
02-type fFiles onlyExcludes directories and other filesystem objects.
03-mtime -1Modified recentlyKeeps files whose modification age is less than one 24-hour period.
Example input
find . -type f -mtime -1
Example output
./logs/app.log
./reports/daily.csv
./backups/db-2026-07-23.sql.gz
Illustrative output — exact values vary by system and data.
Official sources