LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-27-2006, 06:50 AM   #1
warshke
LQ Newbie
 
Registered: Mar 2006
Location: Vilnius, Lithuania
Distribution: debian unstable / win98se
Posts: 8

Rep: Reputation: 0
tar saves absolute path


Hi, i have a problem.
When i try to create an archive, tar command saves absolute paths in it, even if option P is not specified.
It displays "tar: Removing leading `/' from member names" message, but full path ( /home/myname/somefolder....... ) is saved inside archive.
Have anyone encountered same problem?
I'm using "tar (GNU tar) 1.15.1".

Last edited by warshke; 03-27-2006 at 06:53 AM.
 
Old 03-27-2006, 07:24 AM   #2
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,501
Blog Entries: 2

Rep: Reputation: 68
Sure, that is the normal and expected behavior. There is nothing wrong with the resulting tar file. That message is just a warning.
If you want that message is not displayed just specify the path without a absolute specification.
Code:
# cd /
# tar -cf /tmp/backup.tar etc lib boot
# cd /usr
# tar -cf /tmp/X11.tar X11
This is in that way so you can restore a backup in another location. e.g. suppose your /usr partition is offline and you are mounting it on /mnt/temp.
Code:
# mkdir /mnt/temp
# mount /dev/hda7 /mnt/temp
# cd /mnt/temp
# tar -xpf /tmp/X11.tar
cheers
 
Old 03-27-2006, 07:43 AM   #3
warshke
LQ Newbie
 
Registered: Mar 2006
Location: Vilnius, Lithuania
Distribution: debian unstable / win98se
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks, you've saved me a lot of time
 
  


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
Absolute path qspares Linux - Software 6 10-02-2007 03:11 AM
Image Path reference in Linux (Absolute path) javabuddy Linux - General 7 06-05-2006 07:45 AM
absolute path results with ls hawkmauk Programming 12 01-16-2006 09:33 PM
relative to absolute path vishalbutte Programming 4 01-14-2006 03:17 PM
absolute path to qmail in sme 5.6? dopper Linux - Software 0 10-28-2003 01:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:05 AM.

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
Open Source Consulting | Domain Registration