Score:0

How to create a relative symbolic link for a file

si flag

I'm trying to create a link to a JS file. If I type ln -s ./script.js ./scriptLink it successfully creates a working link. But If I type ln -s ./script.js ../scriptLink, the link that's created has red X and an orange lock on the icon.

When I type ls -l in the parent directory, I get

lrwxrwxrwx 1 alex alex 11 July 30 11:38 scriptLink -> ./script.js

and scriptLink and ./script.js are red. I also tried creating the link with sudo, but the result is the same. Changing the script.js permissions to 777 also didn't work.

Score:1
us flag

You have to inform the ln command that the link you are creating is a relative type, like this:

ln -s ./script.js -r ../scriptLink
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.