Attempting to help a client clean up an old file server. It is running on a VERY old solaris box. They have a directory that stores daily files that has files going back to 2010. They would like to remove all files matching certain strings (ending in .CAB or beginning in MD10. ) that were created more than two years ago.
Short of manually sifting through thousands of files is there an easy way to achieve this on an old solaris box?
I was thinking something like
find /home/dats -name "*.CAB" -mtime +732 -exec rm -vf {}; find /home/dats -name "MD10*" -mtime +732 -exec rm -vf {};
Would that achieve what I want without deleting files that do not begin with MD10 or end with .CAB or etc?
[link][11 comments]