3 ms·
It's the same argument order for mv and cp, also the same for rsync and scp Hell, it's even the same argument order for git-clone. Pretty much all command lin
by hasenj 16y ago
It's the same argument order for mv and cp, also the same for rsync and scp
Hell, it's even the same argument order for git-clone.
Pretty much all command lines use "source destination" order.
Why is 'ln' confusing? Because people think of "linking" in a backwards way, it seems that if you're creating a link from A -> B, A is the source and B is the destination. But that's not the meaning of "source destination" that command lines expect
mv B A
A is the new B
cp B A
A is the new B, but B is still there
ln -s B A
A is the new B, except it's just a link, and yes, B is still there.
B is the source, A is the destination. B is the source of the data, A is the destination for that data; the command will create 'A' (or modify it), that's why it's the destination.
For the link itself, B is the destination, but for the operation of creating the link, B is the source, and that's the meaning that's consistent with all other commands.