17

If I have symbolic links in some subtree of my directories and decide to recursively removed a driectory and its contents, will that remove items symbolically linked in the tree?

2 Answers2

20

From the man file

$ man rm

...
The rm utility removes symbolic links, not the files referenced by the links.
...

Version OS X 10.8.2

Look this SuperUser question.

ssedano
  • 316
0

In short, rm and rm -r unlink items from the file system. Unlinking a symbolic link just gets rid of the link. In such a circumstance, the link's target would still point at the file, so the file's reference count remains nonzero. It is not deleted.