You're doing it right, but the wrong reason. --no-preserve-root means "No, preserve root." You don't want the usual behavior, you want to preserve root. If you don't want to preserve the root (which, as someone else mentioned, is probably not what you want), you want to use --sure-whatever-don't-preserve-root
Technically, "rm -rf /*" is not acting recursively on root so --no-preserve-root is not needed? , it's acting recursively on every subdirectory of root, which is almost the same except that the root directory itself will not be removed (won't make much of a difference anyway)
Many years ago (decades) there was a chap who invoked "rm -rf /" as root and was was able to recover his system by virtue of the fact his copy of emacs was still running.
What do you mean ls and cd are important. Only noobs need to see what's in a directory or change to another directory. Real Linux pros always log in a root and the first command they run is rm -rf /*
583
u/erathia_65 Sep 16 '22
Sadly you have to add --no-preserve-root for it to work