Trang Esther
New member
How do I delete a 1 year old file in Linux?
Answer
Answer
- find /path/to/files -type f -mtime +365 -delete would be easier. – …
- -delete isn’t in my aix find so I’m not accustomed to using it. …
- find … – …
- Also, it’s a good idea to use — in case the first file name begins with a – (although you can guarantee it won’t happen if the directory passed to find doesn’t begin with a – ). –