Originally posted by linuxtesting2
thanks for all help. i have ended up with the following command:
find /map -size +10k -name '*' ! -mtime -365 | grep -v .tar | grep -v .gz | grep -v .tgz | grep -v .zip | grep -v .rar | grep -v .bz2 | grep -v .tar.gz | xargs tar cvfz backup.tgz
It now finds every file that is bigger than 10kilobytes exepct those tgz rar.... and zip does down to a file....
You can make that nasty command a little shorter with egrep.
find map -size +10K -name '*' ! -mtime -365|egrep -v '.tar|.gz|.tgz|.zip|.rar|.bz2|.tar.gz'|xargs tar cvzf backup.tgz
A little shorter, maybe more confusing.