I simply need to compress all files in a directory that are not already compressed and that are older than 10 days?
I have this so far. I need to add to this so I don't try and compress file that are already compressed. Or if you think this can be simplified let me know. Thx.
find /my/dir -name "*.xml*" -mtime +10 -ls
find /my/dir -name "*.xml*" -mtime +10 -exec gzip -f {} \;
Thanks for reading