bug#27240: inconsistent and confusing output from 'ln' vs. 'cp': can thi
From:
L A Walsh
Subject:
bug#27240: inconsistent and confusing output from 'ln' vs. 'cp': can this be fixed?
Date:
Sun, 04 Jun 2017 14:12:58 -0700
User-agent:
Thunderbird
Needing to hardlink some files from tree1 to tree2, I
had them in a script and @first used:
"cp -lv":
cp -lv src/a dst/a
'src/a' -> 'dst/a'
Later, I thought to use 'ln -v' for a different tree:
ln -v src/a dst/a
'dst/a' => 'src/a'
Wait a sec.. I'm not linking from dst/a
to src/b, but the other way around.
Hmm, it's using => instead of ->
=> is what is used for *symlinks*.. and there, one
would create a link @ dst/a to point to (=>) src/a.
But this wasn't a symlink.
In the case of hard links, I think the
output in 'ln -v' should be the same as one gets from
cp -lv. Having the src & dst switched is confusing
for what acts like a copy operation and isn't creating
a link from the dest to the src, since afterward, if
the src disappears, the hard-linked file is still valid
(unlike the case w/symlinks).
Should be semi-trivial given the common code, right? ;-)
Thanks
-linda