bug-tar
[Top][All Lists]
Advanced

[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: Paul Eggert
Subject: Re: [Bug-tar] TAR creates hard links or duplicated files inside archive when using -T option
Date: Fri, 02 Nov 2012 11:32:42 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1

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).



reply via email to

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