bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] dereferencing broken since 1.24?


From: Michael Lawrence
Subject: Re: [Bug-tar] dereferencing broken since 1.24?
Date: Wed, 5 Jan 2011 13:58:41 -0800



On Wed, Jan 5, 2011 at 1:09 PM, Joerg Schilling <address@hidden> wrote:
Michael Lawrence <address@hidden> wrote:

> > What is bar in the first case?
> >
> >
> Sorry, somehow this:
>
> $ ln -s foo bar
>
> Got lost in the cut and paste.

In that case, I would expect tar to detect a hard link between foo and bar in
case that -h is used, but carefully read the rest to understand the full
background.

Specifying -h results in using stat() instead of lstat() and this makes it
impossible for tar to distinct between foo and bar as both files return the
same stat() structure.

However, tar does not asume a hard link in case that the link count for foo is
less than two.

For this reason, something like:

     0 -rw-r--r--  root/bs  Jan  5 22:01 2011 foo
     0 -rw-r--r--  root/bs  Jan  5 22:01 2011 bar

is the expected result in case that foo has no other hard links.


Ok. I'm a little confused by this response. If I understand you correctly, with -h there should be no links within the archive, i.e., there are two copies of foo in the archive. This is not how tar >= 1.24 behaves.
 
Thanks,
Michael

Jörg

--
 EMail:address@hidden (home) Jörg Schilling D-13353 Berlin
      address@hidden                (uni)
      address@hidden (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily


reply via email to

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