A soft link, or more common, a symlink, is link a shortcut to the targeted file or directory. So when is removed the original target stays present. This is the opposite of a hard link which is a reference to the target and so, if the hard link is removed, so is the target.
A symlink can be created like:
ln -s /path/ linkname
from the ln man pages:
ln [OPTION]… [-T] TARGET LINK_NAME (1st form) -s, –symbolic make symbolic links instead of hard links
To remove a symlink
rm linkname
What is important here is to note that the command doesn’t have the trailing slash:
$ rm linkname/ will output the error: rm: cannot remove `linkname/': Is a directory $ rmdir linkname/ will output: rmdir: linkname/: Not a directory

1 Comments.