Comment 9 for bug 935480

Revision history for this message
Jan Claeys (janc) wrote :

Actually, on modern unix systems "rm -rf /" will refuse to delete anything (unless you add a special option, like " --no-preserve-root" in GNU rm).

This follows POSIX.1-2008/SUSv4[1]:

| The rm utility shall remove the directory entry specified by each file argument.
|
| If [...] or if an operand resolves to the root directory, rm shall write a diagnostic
| message to standard error and do nothing more with such operands.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/rm.html