Using find and tar together can lead to trouble if the directory has nested sub-directories. find will write-out each qualifying file once - but it will also write-out each parent directory. tar will archive the qualifying file once for the file "entry" - and again for every...
nwo4life ...
find and tar are an awkward mixture!
Basically, this is what you want:
find /dir/test/* -mtime +90 -print > backlist
find /dir/testb/* -mtime +90 -print >>backlist
tar cvf backlist.$(date +%d-%b-%Y).tar -I backlist
HOWEVER - you will have trouble! find will write-out an entry...
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.