On 04/06/17 14:12, L A Walsh wrote: > > 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.
Well you're not linking in any direction for the hard link case. You're creating 'dst/a'. Now you may argue that it should match cp, though it probably makes more sense to match with the `ln -s` case. For completeness we have: $ touch a $ ln -v a b 'b' => 'a' $ ln -sv a c 'c' -> 'a' $ cp -lv a d 'a' -> 'd' $ cp -sv a e 'a' -> 'e' $ cp -v a f 'a' -> 'f' I read the above for ln as "dest linked to source" and for cp as "source copied to dest". > 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. Well => is for hardlinks, and both -> and => were used to distinguish the operations (in v5.92-191-g24ce72f) Given the above interpretation I'm not sure there is anything to change here. thanks, Pádraig