Forrest logo
back to the find tool

find:ai:bc3a9

how do I delete files older than
$ find ${filename}s -type f -mtime +7 -exec rm {} \;
try on your machine

This command finds all files older than 7 days in the specified directory and recursively deletes them.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.

Questions that are answered by this command:

  • how do I delete files older than?
back to the find tool