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: Joerg Schilling
Subject: Re: [Bug-tar] dereferencing broken since 1.24?
Date: Wed, 05 Jan 2011 22:09:03 +0100
User-agent: nail 11.22 3/20/05

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.

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]