In my earlier post I had shown you in detail the steps to create a soft link and hard link in Linux. If you have missed it you can read about the same in below link
How to create Soft Link (Symlink) and Hard Link in Linux
In this post I will show you simple steps to unlink the symlink
Suppose you have a link as shown below
Here shortcut is a symlink for Desktop
Method 1
NOTE: Always remember you have to remove the shortcut link which is created and not the original directory.
NOTE: symlink is the one which you will see in blue colour
Method 2
How to create Soft Link (Symlink) and Hard Link in Linux
In this post I will show you simple steps to unlink the symlink
Suppose you have a link as shown below
# ls -l
drwxr-xr-x. 2 root root 4096 Sep 12 13:55 Desktop
lrwxrwxrwx 1 root root 7 Jan 10 23:34 shortcut -> Desktop
Here shortcut is a symlink for Desktop
Method 1
NOTE: Always remember you have to remove the shortcut link which is created and not the original directory.
# rm shortcut
NOTE: symlink is the one which you will see in blue colour
Method 2
# unlink shortcut/
unlink: cannot unlink `shortcut/': Not a directory
Why am I getting this error?
It is because there is a forward slash at the end of the link which should not be there as it is a link and not a directory so you need to specify only the link which has to be removed/deleted.
Let us try again
# unlink shortcut
Now the command ran without any error. The same can be verified using "ls -l"
Follow the below links for more tutorials
How to do Ethernet/NIC bonding/teaming in Red Hat Linux
How to install/uninstall/upgrade rpm package with/without dependencies
How to install/uninstall/upgrade rpm package with/without dependencies