[Top][All Lists]
[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: |
Joerg Schilling |
Subject: |
Re: [Bug-tar] TAR creates hard links or duplicated files inside archive when using -T option |
Date: |
Mon, 5 Nov 2012 10:55:06 +0100 |
User-agent: |
nail 11.22 3/20/05 |
Paul Eggert <address@hidden> wrote:
> On 11/02/2012 09:29 AM, Joerg Schilling wrote:
> > this should not happen when the file has a linkcount == 1
>
> I don't see why not. There are two instances of the file
> in the archive, at the user's request, and they are the
> same file, so one should be a hard link to the other.
>
> Solaris 'tar' behaves differently. If you do this:
>
> $ touch x
> $ tar cf f x x
>
> it creates an archive with two copies of 'x'. If you do this
> instead:
>
> $ touch x
> $ ln x y
> $ tar cf f x x
>
> it creates an archive with one copy, and a hard link, which
> is what GNU tar does in both cases. GNU tar is more consistent,
> since it behaves the same regardless of whether the file happens
> to have hard links somewhere else in the file system (something
> that should not affect what archive is produced).
It is questionable whether this behavior could be called "more consistent".
UNIX has rules and the indication for a hard link is a link count > 1.
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
- Re: [Bug-tar] TAR creates hard links or duplicated files inside archive when using -T option, (continued)
- Re: [Bug-tar] TAR creates hard links or duplicated files inside archive when using -T option, Joerg Schilling, 2012/11/02
- Re: [Bug-tar] TAR creates hard links or duplicated files inside archive when using -T option, Paul Eggert, 2012/11/02
- Re: [Bug-tar] TAR creates hard links or duplicated files inside archive when using -T option, Live user, 2012/11/02
- Re: [Bug-tar] TAR creates hard links or duplicated files inside archive when using -T option, Live user, 2012/11/02
- Re: [Bug-tar] TAR creates hard links or duplicated files inside archive when using -T option, Tim Kientzle, 2012/11/02
- Re: [Bug-tar] TAR creates hard links or duplicated files inside archive when using -T option, Live user, 2012/11/02
- Re: [Bug-tar] TAR creates hard links or duplicated files inside archive when using -T option, Tim Kientzle, 2012/11/02
- Re: [Bug-tar] TAR creates hard links or duplicated files inside archive when using -T option, Joerg Schilling, 2012/11/05
- Re: [Bug-tar] TAR creates hard links or duplicated files inside archive when using -T option, Nathan Stratton Treadway, 2012/11/02
- Re: [Bug-tar] TAR creates hard links or duplicated files inside archive when using -T option, Live user, 2012/11/02
- Re: [Bug-tar] TAR creates hard links or duplicated files inside archive when using -T option,
Joerg Schilling <=
- Re: [Bug-tar] TAR creates hard links or duplicated files inside archive when using -T option, Live user, 2012/11/05
- Re: [Bug-tar] TAR creates hard links or duplicated files inside archive when using -T option, Paul Eggert, 2012/11/05
- Re: [Bug-tar] TAR creates hard links or duplicated files inside archive when using -T option, Paul Eggert, 2012/11/05
- Re: [Bug-tar] TAR creates hard links or duplicated files inside archive when using -T option, Joerg Schilling, 2012/11/05
- Re: [Bug-tar] TAR creates hard links or duplicated files inside archive when using -T option, Paul Eggert, 2012/11/05
- Re: [Bug-tar] TAR creates hard links or duplicated files in sidearchive when using -T option, Marek Kielar, 2012/11/05
- Re: [Bug-tar] TAR creates hard links or duplicated files insidearchive when using -T option, Paul Eggert, 2012/11/05
- Re: [Bug-tar] TAR creates hard links or duplicated files inside archive when using -T option, Live user, 2012/11/06
- Re: [Bug-tar] TAR creates hard links or duplicated files in side archive when using -T option, Marek Kielar, 2012/11/07
- Re: [Bug-tar] TAR creates hard links or duplicated files inside archive when using -T option, Paul Eggert, 2012/11/07