Dimitrios Apostolou wrote:
$ touch blah
$ ln -s blah link_to_blah
$ cp --dereference link_to_blah blah2

The result is that "blah" and "blah2" have different inode!

Of course, and that's what one would expect, cp makes copies by default, and the copies have a different inode from the original.

I was referring to something like this:

touch blah
ln -s blah link_to_blah
mkdir dir
cp -a --dereference blah link_to_blah dir

This creates two hard links in dir, to the same new file. ("-a" attempts to make "cp" act as much like "tar" as it can.)

Reply via email to