Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

soft link - 'ln' 1

Status
Not open for further replies.

praise12

IS-IT--Management
Mar 17, 2002
17
US
I have a soft link (used ln -s command) directory in my path. Can I simply remove it by using rm command? If yes, is it going to remove the files in the directory I linked from? Please advise. Many Thanks.
 

Yes you can remove a soft link with the rm command and it won't remove the files in the linked directory.

But you can prove it to yourself by creating a temporary directory containing a temporary file, creating a temporary soft link to it and removing the link. CaKiwi
 
This is helpful...many Thanks...
Have a great weekend!
 
good idea to test it, some versions of UNIX do it one way (remove the link but not the file) and some the other (remove the target file as well) Mike
________________________________________________________________

"Experience is the comb that Nature gives us, after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top