Nguyễn Thành Huy
New member
How do I delete old files in UNIX?
Answer
4 Answers
Answer
4 Answers
- Also use -type f to delete files only (and keep sub directories) – Oleg Mar 4 ’16 at 8:44.
- Alternatively, if you want to do the same for all files NEWER than five days: find /path/to/directory/ -mindepth 1 -mtime -5 -delete – zmonteca Apr 19 ’16 at 17:29.