1

Removing files older then 1 month, but leave one file per month

view story
linux-howto

http://superuser.com – I try to script something similar to Removing files older then 1 month, but leave files created at the 1st day of the month. The difference is that I need one file per month. I am using the script with my build environment, which isn't executed daily caused by the scm polling. I think the only way to achieve it is to use a find to get all "old" files and execute some checks against it. First I would remove all files from the list, which has been kept as month file. Then I would remove one file as month file from the list and after it I would delete all files out of the list. Did I missed a (HowTos)