Am I the only person who, after 30 years of using the `ln` command, *still* gets it arguments backwards?
If I type:

$ ln -s x y

My mind is always thinking: “I want a symlink where x ⇒ y”, and as such I incorrectly put the destination *before* the source.

I am sure `ln` is this way in #POSIX to match the behavior of `cp` & `mv`. The latter two are intuitive to me because I read it as “copy/move x to y”.
$ ls -l y
lrwxrwxrwx 1 bkuhn bkuhn 1 May 2 14:39 y -> x

“y ⇒ x” … See!?!?!

Follow

@bkuhn I tricked myself into remembering this by telling myself that I can create multiple links to one source, and so of course the new names have to be last because you can have as many of them as you want. Which of course you can't, but don't tell me that, because it works and I never need to do that anyway.

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml