Linux Tar Getting Removing Leading `/' From Member Names When Executed
linux tar getting removing leading `/' from member names when executed
linux, tar, getting, removing, leading, from, member, names, when, executed
Linux Tar Getting Removing Leading `/' From Member Names When Executed
Post Description: linux tar getting removing leading `/' from member names when executed
POST# 204
Posted On: Fri Feb 29, 2008 12:01 pm
pinguin
Topic: Linux Tar Getting Removing Leading `/' From Member Names When Executed
hi, can anyone helpme, when i send the tar command, i get this:


     Code:
Removing leading `/' from member names


when i look at my directory, i see that the tar has been created, but i was wondering if this is going to cause a problem when i try to untar it since this is going to be a back up file and if there any goes wrong, i want to make sure i am doing it right. not sure if i executed incorectly on my linux server.

thanks


Fri Mar 16, 2007 6:09 am
1
Gonatan
Reply #708
Just found this: https://forum.bytemark.co.uk/viewtopic.php?pid=1937

This may help you with your question
Sat Mar 17, 2007 7:27 pm
2
brando
Reply #709
this is what that post says:

he "Backup Ideas" page[1] has an example shell script meant to be executed as a daily cron job.




That example includes an invocation of the tar command like this:



tar cj /etc /home/ /usr/local > $PREF-$$.tar.bz2



If you run a script containing a tar invocation of that form, you'll notice that root will get an e-mail message every time the script runs, with stderr warnings from the tar command saying "Removing leading `/' from member names".



You can eliminate those tar warnings by instead invoking the tar command like this:



tar cj -C / etc home usr/local > $PREF-$$.tar.bz2



The effect will be the same except that tar will no longer emit the "Removing leading `/' from member names" warnings to stderr -- because the -C option and slash argument tell tar to cd to the root directory before tarring up whatever directories or files are specified in the rest of the arguments list.



So you'll no longer get the unnecessary mail from that cron job -- you'll only get mail if something has actually gone wrong with the job.

What do you think?

* name:  

* email:  

* Please enter comments:


Receive Replies on my Comments
(An email will be sent to you when someone replies to your comments)

Add image to comments
yes no             upload