LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   tar: Removing leading `/' means? (https://www.linuxquestions.org/questions/linux-newbie-8/tar-removing-leading-%60-means-598189/)

packets 11-08-2007 06:28 PM

tar: Removing leading `/' means?
 
I'm just wondering what does this mean :

tar: Removing leading `/' from member names

I successfully run tar and created archive. I'm just wondering why is this appearing. Could it affect tar performance? Here is my command:

tar -czvf /home/backuppc/rbldns.tar.gz /var/lib/rbldns --exclude /var/lib/rbldns/var

Also, is there a test how can I verify if tar is corrupted?

djzanni 11-08-2007 06:37 PM

I don't remember ever seeing this myself, but it probably just means that the archive you created has the '/'s removed so that when you untar the archive into a directory of your choosing, you won't have an extra '/' in there. So, for instance, you've tared the directory /var/lib/rbldns. Now let's say you want to untar that into a directory '/some/directory/'. If tar didn't strip the leading '/'s, then the result would be something like '/var/lib/rbldns//some/directory'. That is, you have an extra '/' in there that you don't want. That's my interpretation of what's going on.

billymayday 11-08-2007 06:48 PM

Quote:

tar interprets relative file names as being relative to the working directory. tar will make all file names relative (by removing leading slashes when archiving or restoring files), unless you specify otherwise (using the ‘--absolute-names’ option). See section Absolute File Names, for more information about ‘--absolute-names’.
From the GNU Tar book.

packets 11-08-2007 07:17 PM

I added -P into -czvf and it is now oks. Probably its the absolute path


All times are GMT -5. The time now is 02:53 PM.