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?
Asked
Active
Viewed 6,795 times
17
-
Belongs on [su]. – millimoose Dec 16 '12 at 00:36
-
1Doesn't really need to be on Super User; it is a question about a program used in shell programming, and as such is on topic for Stack Overflow. – Jonathan Leffler Dec 16 '12 at 03:41
-
Read the manual, do some experiments. – vonbrand Jan 23 '13 at 19:03
-
4Does this answer your question? Does rm -rf follow symbolic links? (historical note: this question was originally on SO, then got migrated here. the answer post linked to the dup-target I'm proposing) – starball Jan 01 '24 at 02:21
1 Answers
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.