1832313 Members
2109 Online
110041 Solutions
New Discussion

Symbolic links

 
Ayanda_2
Occasional Contributor

Symbolic links

How can I remove a symbolic link ?
2 REPLIES 2

Re: Symbolic links

Just rm it, it won't remove the original file, as in this example:

# ls
# touch a
# ll
total 0
-rw-rw-rw- 1 root sys 0 Sep 10 10:43 a
# ln -s a b
# ll
total 0
-rw-rw-rw- 1 root sys 0 Sep 10 10:43 a
lrwxrwxrwx 1 root sys 1 Sep 10 10:44 b -> a
# rm b
# ll
total 0
-rw-rw-rw- 1 root sys 0 Sep 10 10:43 a
#


HTH

Duncan

I am an HPE Employee
Accept or Kudo
H.Merijn Brand (procura
Honored Contributor

Re: Symbolic links

with 'rm'

it's just like any other file, pipe, or device

the only odd one out is a folder or directory which you cannot remove with rm, but you need rmdir

Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn