On Thu, Jan 6, 2011 at 1:39 PM, Paul Eggert <[email protected]> wrote:
> On 01/06/11 10:06, Michael Lawrence wrote: > > The last example I provided has no hard links. > > No, actually, it has hard link. In the typical case (which > is what you had), a regular file has one hard link to it. > Less commonly, regular files can have two or more (or zero!) > hard links. > > I'm sorry, but where is the hard link here? $ ls -l foo bar lrwxrwxrwx 1 larman larman 3 Jan 4 15:06 bar -> foo -rw-r--r-- 1 larman larman 0 Jan 4 15:06 foo There are no hard links to foo anywhere. Shouldn't 'bar' be replaced by the regular file 'foo'? > Are you saying that tar now behaves the same, > > regardless of whether there is a hard link to foo? > > More accurately, I'm saying that tar now behaves the same, > regardless of the number of hard links to foo. > > > So dereferencing a symlink will always produce a hard link in the > archive? > > No, dereferencing a symlink will always produce whatever would have > been produced had the symlink been replaced by whatever it points to. > Typically this will not be a hard link in the archive. >
