ln -s [one]
[two]the arguments are done in the same order as if you would have done it with cp.
Yes, it really is that easy. You can stop worrying about it now.
Mikołaj Hołysz reshared this.
ln -s [one]
[two]the arguments are done in the same order as if you would have done it with cp.
Yes, it really is that easy. You can stop worrying about it now.
Mikołaj Hołysz reshared this.
Tom
in reply to daniel:// stenberg:// • • •Kim Gräsman
in reply to daniel:// stenberg:// • • •Zygmunt Krynicki
in reply to daniel:// stenberg:// • • •Winni Neessen
in reply to daniel:// stenberg:// • • •Thomas Frans 🇺🇦
in reply to daniel:// stenberg:// • • •gigantos
in reply to daniel:// stenberg:// • • •how come this never sticks. I never managed to make this connection for some strange reason.
So instead, my approach for years was always "ln -s a b && ls -l".
And now, I just imagine myself doing the above, and then remember that "b" always came out.
It means I spend a few seconds before running the command, every time.
I never had this issue for cp, wonder why
Sheldon Cooper
in reply to daniel:// stenberg:// • • •I always imagine softlinks as text file containing the source path.
i.e.
ln -s [source] [dest]
as
echo [source] > [dest]
Helps understand relative path symlinks easily
Joachim Wiberg
in reply to daniel:// stenberg:// • • •SkaveRat 🐀 :verified:
in reply to daniel:// stenberg:// • • •tb
in reply to daniel:// stenberg:// • • •grin
in reply to daniel:// stenberg:// • • •towo
in reply to daniel:// stenberg:// • • •`cp one two` copies one to two` `ln -s one two` makes two a symlink of one; yes, the second is "made like the first" with that command, and it's logical that the "new" thing is the second argument.
There's an argument to be made that it's logical to say "I want a link named foo to point at bar" instead of "I want a link for bar that is called foo".
ln's straightforward, but command "etymology", for lack of a better word, matters.
Chris Lewis
in reply to daniel:// stenberg:// • • •Accept purpose.
in reply to daniel:// stenberg:// • • •a useful memnonic for both 'ln' and 'cp' is
"What you want, where you want it."
Uwe Caspari
in reply to daniel:// stenberg:// • • •Florian Streibelt (mutax)
in reply to daniel:// stenberg:// • • •Ben :bub:
in reply to daniel:// stenberg:// • • •Robert Lou Dobbs III
in reply to daniel:// stenberg:// • • •PixelHamster
in reply to daniel:// stenberg:// • • •sirjofri
in reply to daniel:// stenberg:// • • •André Freitas
in reply to daniel:// stenberg:// • • •WesMason
in reply to daniel:// stenberg:// • • •@lisamelton
Windows User: what's cp?
🙃
daniel:// stenberg://
in reply to WesMason • • •