create symbolic link in linux

Symbolic link is a shortcut or alias to another file in linux, unix, mac or any other nix systems.
The syntax for creating a symbolic link:

ln -s "target file" "shortcut"

Example

ln -s /usr/local/bin/myscript.sh myscript.sh

After the above command, if you do a ls -l you will see something like this which tells you that the symbolic link(myscript.sh) in your current directory is point to /usr/local/bin/myscript.sh

lrwxr-xr-x  myscript.sh -> /usr/local/bin/myscript.sh

To unlink the symbolic link

unlink myscript.sh

Search within Codexpedia

Custom Search

Search the entire web

Custom Search