GNU bug report logs - #19616
dist tarball contains hardlinks

Previous Next

Package: automake;

Reported by: Dimitrios Apostolou <jimis <at> gmx.net>

Date: Fri, 16 Jan 2015 15:44:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Dimitrios Apostolou <jimis <at> gmx.net>
Cc: 19616 <at> debbugs.gnu.org, bug-tar <at> gnu.org
Subject: bug#19616: [Bug-tar] dist tarball contains hardlinks
Date: Fri, 23 Jan 2015 08:19:55 -0800
Dimitrios Apostolou wrote:
> $ touch blah
> $ ln -s blah link_to_blah
> $ cp --dereference link_to_blah blah2
>
> The result is that "blah" and "blah2" have different inode!

Of course, and that's what one would expect, cp makes copies by default, and the 
copies have a different inode from the original.

I was referring to something like this:

touch blah
ln -s blah link_to_blah
mkdir dir
cp -a --dereference blah link_to_blah dir

This creates two hard links in dir, to the same new file.  ("-a" attempts to 
make "cp" act as much like "tar" as it can.)




This bug report was last modified 10 years and 93 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.