Dave's Brain

Browse - Programming Tips - When I use tar it says: "Removing leading `/' from member names"

Date: 2008nov6
Language: bash
Keywords: slash

Q.  When I use tar it says: "Removing leading `/' from member names"
how can I suppress that message?

A.  I wish there was an option for this but here is the best way.

If you are doing:

tar cf /aaa/bbb/ccc.tar /xxx/yyy/zzz
Change it to:
SRC=/xxx/yyy/zzz DIRNAME=`dirname $SRC` BASENAME=`basename $SRC` tar cf /aaa/bbb/ccc.tar -C $DIRNAME $BASENAME

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.