Sunday, September 29, 2024

Finding recent files in Linux with "find" command

The command "find * -type f -mtime -7" is used to search for files that have been modified within the last 7 days in the current directory. Here's a breakdown:

  • find *: Starts the search in the current directory (* represents all files and directories).
  • -type f: Limits the search to files only (excluding directories).
  • -mtime -7: Finds files modified within the last 7 days.

In summary, this command locates files in the current directory that have been changed in the last week.

***

No comments:

Post a Comment