6
1
I noticed in the documentation for rm
as obtained by rm --help
the following flag:
--no-preserve-root do not treat `/' specially
What does this mean? Is it actually possible to delete the root directory, apart from its contents? What consequences would that have?
2Yes, they put in place a protection from people who try
rm -rf /
. They put that in place because yes, you can and you're system will be useless. – nerdwaller – 2013-01-28T17:02:10.333In my understanding,
rm -rf /
deletes the contents of the root directory; but wouldn't the root directory itself still exist? – gerrit – 2013-01-28T17:03:18.3831@gerrit: Yes, it would. But this command is precisely why the "preserve root" mode was added: rm refuses to operate recursively on
/
unless you add the--no-preserve-root
option. – user1686 – 2013-01-28T17:04:14.397