wood burning stoves 2.0*
The moose likes Linux / UNIX and the fly likes delete soft link Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "delete soft link" Watch "delete soft link" New topic

delete soft link

kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1376
How to delete only soft link without deleting directory and its contents. unlink deletes soft link and directory too.
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24187


No, deleting a soft link deletes only the link. If you have a link to a directory and you just say "rm link", then the link is removed. If you say "rm -rf link", though, then yes, the whole linked-to directory will be emptied out.

[Jess in Action][AskingGoodQuestions]
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: delete soft link