@monsieuricon yup, 30 years of Unix/Linux daily use and I still fail this one. Reminds me of USB Type-A 50% chance of plugging it wrong, but failing it *every* time.
BTW, @bagder started a separate thread on this and people are mostly getting it right on the first try - smh...
USB always needs three attempts:
1. Wait, this feels awkward, better try the other way round.
2. No, that's _definitely_ wrong. It _has_ to be the other way round.
3. Ahh...
@monsieuricon I had the same issue for a while.
Especially since I rarely use ln. I try to convince my brain that "-s" would mean "source" even though I know it actually means "symbolic link", just so I remember that the first argument right after the "-s" option is the existing, "source" file.
Yes, but what about tar?
Yeah, when I say it's like cp, that doesn't mean it's intuitive. I just have to repeat the mantra.
@monsieuricon @dgar every single time - my command history is:
$ man ln
$ ln -s blah blah
Cannot make it stick.
@monsieuricon haha while i'm in the "bro it's like cp(1)" crowd, i can appreciate where you're coming from because of memcpy(dest,src, ..).
i tend to find myself in this situation when it comes to unfamiliar assembly syntaxes, or even at&t vs. intel -- is it like cp(1) or is it like memcpy(3)
@monsieuricon Yes, it's a Sapir-Whorf thing. Some languages are verb-subject-object, and some are verb-object-subject. Yoda even speaks object-subject-verb (in the original, anyway; it's trickier in the German translation).
Don't think of it as a matter of abstract intuition, but as a matter of foreign language intuition. The intuition of consistency, not the intuition of essence.
pip destination=source. If Unix has been modelled after that, we'd be doing hard links by pip destination<=souce, and symlinks as pip destination<-source.@corsac @monsieuricon I actually prefer to do
```ln -s target``` without the linkname and then rename the targetname to the linkname, if at all necessary...
@clusterfcku @monsieuricon it's this thinking which leads to the manpage being super confusing.
$tool $existing_path $newly_created_path
forget the minutae, start with the simpler description!
@monsieuricon Most of the time I fall for it, too :D
Sometimes I can remember that you NEED a target, but linkname is optional
Firstly, plain "ln" without "-s", and not crossing file system boundaries, is like "mv" without the remove part. You end up having the same file twice, in two directories, or different names in the same, symmetrically, no original and no copy. Doesn't work on directories, though.
Secondly, "ln -s" is like "ln", only the result is not symmetric, but then, it may cross file system boundaries and point to directories.
So if you remember how to use mv, you're fine.
@dj3ei @hennichodernich @monsieuricon
Yeah `mv` is kind of the Star Trek teleporter, and `ln` one of those episodes where you wind up with two of someone.
@kaito02 @monsieuricon from the link to the past,
from source to symlink
@monsieuricon @uliwitness “the same as cp”
(not that I don’t have to remind myself of that, but)
@monsieuricon yeah, it is funny that it is always "from to", when you create link "FROM_target (<-) TO_link_name", but when you list files you get "FROM_link_name -> TO_target"
EDIT: s/target/source/ sounds better in the first case when you create link
@monsieuricon IDK any program that doesn't demand $source $destination as parameters in that order...
So ofc the target is the destination...