How to Find Files Modified Exactly N Minutes Ago in Ubuntu (find -mmin)

The Rapid Debugging Scenario

In Ubuntu Linux, the standard -mtime flag allows you to find files based on the day they were modified. However, if a web server crashes or a database script fails right in front of your eyes, waiting to search by “days” is useless. You need to know exactly which configuration files or error logs were altered in the last few moments. The Linux search engine features a dedicated, high-resolution flag designed specifically for analyzing granular, minute-by-minute system activity.

Using the find Command with -mmin

The Linux find command utilizes the -mmin flag (modified minutes) to isolate files based on strictly defined 60-second historical windows.

  1. Open your Terminal application (Ctrl + Alt + T) or log into your server via SSH.
  2. To scan the /var/log/ directory and return files whose contents were altered exactly 15 minutes ago, type the following command exactly:
  3. find /var/log/ -type f -mmin 15
  4. Press Enter.

The Precise Window

The integer provided to the -mmin flag is absolute. By omitting the plus or minus modifiers (e.g., you did not type -15), you are instructing the search engine to look for files whose contents changed strictly within the 60-second block that occurred exactly 15 minutes prior to executing the command. If a file was modified 14 minutes ago or 16 minutes ago, it will be completely ignored, allowing you to surgically isolate the exact log file generated at the moment of a system crash.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.