Thanks Salem, But that command (find . -mtime +14 -ls | awk '$7 != "Sun" { system("rm " $NF) }') will remove everything older than 14 days. I still need to keep every sunday as well.
The second command you gave shows all zeros
Hi Everyone,
I need to remove files by specific dates. So for example, if i have files from a two month period of time, i want to keep files from the last 14 days and every Sunday beyond that only.
Thanks
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.