How can I symlink a file in Linux? [closed] – Dev

The best answers to the question “How can I symlink a file in Linux? [closed]” in the category Dev.

QUESTION:

I want to make a symbolic link in Linux. I have written this Bash command where the first path is the folder I want link into and the second path is the compiled source.

ln -s '+basebuild+'/IpDome-kernel/kernel /home/build/sandbox/gen2/basebuild/IpDome-kernel/kernal 

Is this correct?

ANSWER:

ln -s TARGET LINK_NAME

Where the -s makes it symbolic.

ANSWER:

To create a new symlink (will fail if symlink exists already):

ln -s /path/to/file /path/to/symlink

To create or update a symlink:

ln -sf /path/to/file /path/to/symlink

ANSWER:

ln -s target linkName

You can have a look at the man page here:

http://linux.die.net/man/1/ln

ANSWER:

ln -s EXISTING_FILE_OR_DIRECTORY SYMLINK_NAME