Merry Christmas & Happy 2027! Less downtime. More good times. Celebrating 13 years of sorlavit.com
Skip to content
Sorlavit KimIT Support, Network & Infrastructure Services Let’s talk

Articles are written in English. The Thai translation button opens Google Translate; code and commands stay in their original form.

Linux Commands / IT Support Guides

Locate recent files with find

Use find to list regular files changed within the last 24 hours.

Compiled for Sorlavit Kim · Published · Updated · 1 min read

Environment and inputs: Linux · Bash-compatible shell; package and service names vary by distribution

Understand the problem

Choose a starting directory you can read. The sample searches /var/log and traverses its subdirectories.

Run the command

The -type f test selects regular files and -mtime -1 selects files whose modification age is less than one 24-hour period. The -print action displays the matching paths.

find /var/log -type f -mtime -1 -print

Read the output

Each output line is a path, such as /var/log/app/app.log. A matching file could have been created or edited recently. The command checks modification time.

Choose the next step

If you find the expected file, check its timestamp and open it with the appropriate viewer. If there is no match, check the starting directory and widen the time window if needed.

Before making changes

Treat the list as incomplete if find prints Permission denied. A broad search can take time, so start with the application directory when you know it.

Share this article

Back to all articles