Michael Lawrence <[email protected]> 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:[email protected] (home) Jörg Schilling D-13353 Berlin
       [email protected]                (uni)  
       [email protected] (work) Blog: 
http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily

Reply via email to