Half the replies to this are “haha me too” and the other half are “the answer is _, obviously”

I’m chuffed that half my followers are computer geniuses and the other half are as bad at computers as I am. Perfect equilibrium.

Show thread

do i look like i know what an inode is? i'm a mac user ffs

Show thread

Oh what’s that? `ln` has an optional destination parameter? Isn’t that a :big_mood: eh

Show thread

please, everyone stop replying to this meme, please I– I have a family

Show thread

@djsundog @ashfurrow This was me until Angie Byron taught me the life-changing mnemonic of "use the same order you would for the cp command"

@bonzoesc @ashfurrow I just absolutely never got that argument, because it depends on what you think "src" *is*!

Is that where the link *points to*, or where the link *is*?

@faho @ashfurrow you're copying the inode number from the source to the destination

@faho @ashfurrow the thing that has to exist at the start of the process is the source, and the thing that does not have to exist and may be created through the process is the destination

@bonzoesc @ashfurrow But now I'm thinking of inodes, which... I don't typically do?

Like... I'd expect to be talking about the actual link. The link points from A to B, so A is the source, B is the destination.

Note: I've actually managed to brute-force myself to remember this one, I'm just telling you that the simple "src dest" mnemonic is bad

@faho @ashfurrow without the `-s` the thing that's created isn't really a link, it's just another equal reference to the same inode

the `-s` symlinking tries to make something analogous to that, and it's important to look at the nomenclature through the lens of hardlinking with `ln`

@ashfurrow @djsundog @mdhughes If you give it without a destination, it links from the source to the current directory. Since you usually can't give an optional first argument, the first argument is always what you're linking to.

@ashfurrow Think of it as if you were using cp instead. :)

@ashfurrow I think it's even worse for `rsync`. there are too many options than just `symbolic` 😑

reminds me of this XKCD xkcd.com/1168/

@ashfurrow I just say it out loud and use the long options. you can't go wrong when you're `--extract --gzip --verbose --file tar-archive.tar.gz` or `--create --gzip --file tar-archive.tar.gz [from] directory`.

the other confusions new ( or even occasional ) users might have is where to put the archive name and the directory / file to be archived.

@ashfurrow I look it up every time. same with strstr() in PHP :P

@ashfurrow I had to have picked that up from either Stephen Kochan's UNIX shell book, or UNIX for the Impatient, 30-34 years ago. Possibly Wile E. Coyote "genius", more likely good at retaining syntax and language tricks.

@ashfurrow This is one of those things where you can interpret destination differently. Is it where the link gors or where it points?

Doesn't help things.

Anal pretty sure the Windows one is backwards compared to the Linux one.

@ashfurrow Isn't that the basic unit of the EXT filesystems?

@ashfurrow The fun thing about this is I know which way to use `ln -s` in practice, but I get confused by “src” and “dest” because they mean the opposite thing at creation time and at usage time :blob_dizzy_face:

@ashfurrow thank goodness I'm not the only one who keep having to refer to the command help to remember. >.<

@ashfurrow *uses dolphin to create a link because i'm scared of getting it backwards and destroying something*

@ashfurrow No you messed up the links and made weird clones of yourself.

@ashfurrow you made the mistake of posting the meme. you have to suffer now 😅

@ashfurrow (My memory tool for this: the args are in the same order as for cp.)

@ashfurrow someone should came up with a version for ffmpeg arguments...

@ashfurrow the real evil is rsync and scp where a trailing / is semantically important

@ashfurrow same meme but the buttons are "/dest is the destination the link points to" and "/dest is the destination the link gets put into"

@ashfurrow instead of "cd destdir && ln -s src", you can also do "ln -s -T src dest"

('src' being whatever the symlink will point to, and 'dest' the new symlink)

@ashfurrow Fun story: When I was learning AT&T UNIX in 1996, the older "UNIX guru" wrote out a symbolic link instruction and told me "This sets up the link.. etc.."

I told him he got it backwards. He denied this and ranted about it for quite some time, but it turned out I was right and he was wrong.

Unfortunately, he had the ear of the manager and managed to "get me fired" over it.

@ashfurrow *my brain explodes* - Worst UX EVAR! I have to go to manpage or --help Every Single Time! :)

@ashfurrow the real question is "which file is the src"

@ashfurrow echo -e "/src\n/dst" | sort -R | xargs ln -s

Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!