3

My home directory has a symlink to my home directory. I'm not sure how it got there. Is it safe to delete?

~ steve$  ls -l steve
lrwxr-xr-x  1 steve  staff  12 Jun 21  2012 steve -> /Users/steve

Home directory in Finder

7

In command line you´ve more power with the following code line

cd ~ && unlink steve

so you´re shure that only the symlink will be deleted and not the complete home path :)

0
5

Simply running rm ~/steve is safe:

  1. specifying "~/steve" (not "~/steve/", with a trailing slash) means rm will work directly on the link and not follow it, as it would if you enter "~/steve/".

  2. even if you mistyped "~/steve/", deleting with rm will not delete a directory unless you give it a "-r" option.

2

Yes. Providing you don't delete the contents of the symlink and just the symlink, you can delete the symlink fine. Just use ⌘⌫ on the symlink from Finder.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .