LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-08-2007, 06:28 PM   #1
packets
Member
 
Registered: Oct 2005
Posts: 319

Rep: Reputation: 32
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?
 
Old 11-08-2007, 06:37 PM   #2
djzanni
Member
 
Registered: Dec 2003
Location: Washington, DC
Distribution: Ubuntu 7.04
Posts: 73

Rep: Reputation: 15
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.
 
Old 11-08-2007, 06:48 PM   #3
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
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.
 
Old 11-08-2007, 07:17 PM   #4
packets
Member
 
Registered: Oct 2005
Posts: 319

Original Poster
Rep: Reputation: 32
I added -P into -czvf and it is now oks. Probably its the absolute path
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/bin/tar: Removing leading `/' from member names guarriman Linux - General 16 02-09-2010 08:19 PM
tar problem - Removing leading / from hard link targets rajeshkahara Linux - Software 2 01-05-2006 01:33 PM
Problem with tar - Removing leading `/' from hard link targets rajeshkahara Linux - Software 1 01-03-2006 05:23 PM
Problem with tar - Removing leading / from hard link targets rajeshkahara Linux - Software 4 01-03-2006 04:22 AM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration