How do I delete old dated files in Linux?

How do I delete old dated files in Linux?
Answer
How to delete all files before a certain date in Linux
  1. find – the command that finds the files.
  2. . – …
  3. -type f – this means only files. …
  4. -mtime +XXX – replace XXX with the number of days you want to go back. …
  5. -maxdepth 1 – this means it will not go into sub folders of the working directory.
 

Tìm kiếm

Back
Top