I run this from a cronjob:

tar -czvf /var/backups/svn.tgz /var/svn/*

That generates this on stderr:

tar: Removing leading `/' from member names

I would like to avoid this because it is not a real error (for me!). I want on stderr only things that I should worry about?

How can I kill that message?

I have the feeling that it is a matter of using the tar -C option but I am not sure and I don't know how.

Thanks for the help,
Dan

link|improve this question

43% accept rate
feedback

1 Answer

up vote 4 down vote accepted

your options: -P, --absolute-names : don't strip leading `/'s from file names or -C / (and a relative path for things to go into the tar) ...depends on what you want.

link|improve this answer
I don't want -P. I want -C but I can't get it to work. – dan Nov 11 '10 at 15:11
2  
I have found it out: tar -czvf /var/backups/svn.tgz -C / var/svn/ – dan Nov 11 '10 at 15:13
feedback

Your Answer

 
or
required, but never shown

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