bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] TAR creates hard links or duplicated files inside archive


From: Nathan Stratton Treadway
Subject: Re: [Bug-tar] TAR creates hard links or duplicated files inside archive when using -T option
Date: Fri, 2 Nov 2012 16:28:01 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

On Fri, Nov 02, 2012 at 21:12:47 +0100, Live user wrote:
> The issue is very easy to reproduce:
> 
> mkdir -p r/libs/ r/prefs/
> 
> touch _manifest \
> r/androidTrophy.dat \
> r/libs/libAndroid.so \
> r/InsTime \
> r/prefs/gl_ver
> 
> Put into list.txt :
> _manifest
> r/androidTrophy.dat
> r/libs/
> r/libs/libAndroid.so
> r/InsTime
> r/prefs/
> r/prefs/gl_ver
> 
> tar -cvf myarchive.tar -T list.txt
> 
> There are 2 hard links created, libAndroid.so and gl_ver

I believe that if you look closely at the output of the tar command
you'll see that each of those files is added to the the archive as part
of the processing the containing directory, and then a hard-link entry
is added when the the list.txt line containing the explict filename is
processed.

If that's indeed the problem, then using the "--no-recursion" option
should avoid the issue.

                                                        Nathan


----------------------------------------------------------------------------
Nathan Stratton Treadway  -  address@hidden  -  Mid-Atlantic region
Ray Ontko & Co.  -  Software consulting services  -   http://www.ontko.com/
 GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt   ID: 1023D/ECFB6239
 Key fingerprint = 6AD8 485E 20B9 5C71 231C  0C32 15F3 ADCD ECFB 6239



reply via email to

[Prev in Thread] Current Thread [Next in Thread]