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


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "delete soft link" Watch "delete soft link" New topic
Author

delete soft link

kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1372
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
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Hi,

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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: delete soft link