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
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.
Sign up to join this communityIn 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 :)
Simply running rm ~/steve
is safe:
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/".
even if you mistyped "~/steve/", deleting with rm
will not delete a directory unless you give it a "-r" option.
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.