Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Here is the code I use in my CentOS 5 32bit.
But after this I see only some of files are zipped and a lot of them isn't included in produced gzip file.

nohup watch --interval=60 tar -zcvf /home/C/`date '+%m%d%y%H%M%S'`.tar.gz --exclude /home/C/t1/log.txt --exclude /home/C/t1/logs/log.txt /home/C/t1 &

Anyone know what is the problem with this ?

share|improve this question
2  
Can you edit and add details of what files do and don't make it into the tarball? –  Paul Oct 13 '13 at 21:07

1 Answer 1

You could try putting quotes around the interval time like this:

--interval="60"

Secondly I recommend running this watch inside of a screen without the nohup.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.