Remove a symlink to a directory

前端 未结 11 1029
情深已故
情深已故 2020-12-02 03:16

I have a symlink to an important directory. I want to get rid of that symlink, while keeping the directory behind it.

I tried rm and get back rm

11条回答
  •  天涯浪人
    2020-12-02 03:59

    Assuming your setup is something like: ln -s /mnt/bar ~/foo, then you should be able to do a rm foo with no problem. If you can't, make sure you are the owner of the foo and have permission to write/execute the file. Removing foo will not touch bar, unless you do it recursively.

提交回复
热议问题