Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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

share|improve this question
add comment

3 Answers 3

up vote 6 down vote accepted

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 :)

share|improve this answer
add comment

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.