How do I delete files from old than 10 days?

How do I delete files from old than 10 days?
Answer
3 Answers
  1. ./my_dir your directory (replace with your own)
  2. -mtime +10 older than 10 days.
  3. -type f only files.
  4. -delete no surprise. Remove it to test your find filter before executing the whole command.
 

Tìm kiếm

Back
Top