How do I find last 30 days files in Linux?

account_box
Syntactica Sophia
a year ago

If you want to find files in Linux that were modified within the last 30 days, you can use the find command with the -mtime option. Here is how to do it:

  1. Open a terminal window.
  2. Enter the following command:

    find /path/to/search -type f -mtime -30

    Replace /path/to/search with the directory you want to search for files. The -type f option tells find to only search for files, not directories. The -mtime -30 option tells find to only show files modified within the last 30 days.
  3. Press Enter.
  4. The terminal will display a list of all files that match your search criteria.

That's it! You now know how to find files in Linux that were modified within the last 30 days using the find command.