You might be thinking of the GNU version of rm (the version on any modern linux). There you need `rm -rf --no-preserve-root /` to delete everything, which prevents GP's typo (`rm -rf /*` might still work though).
Re:$ sudo rm -rf / === NPM install
by bravetraveler on Tuesday November 09, 2021 @12:27PM
(#29164528)
Can confirm /* notation still works. It comes down to how things are interpreted. The shell expands that before rm ever gets argv
Re:$ sudo rm -rf / === NPM install
by spicybright on Tuesday November 09, 2021 @08:48AM
(#29161645)
Not under Catalina. Don't ask me how I know that.
I just tried it in Big Sur and it wouldn't allow it.
Nah, it totally works. Yall should try it.
I just did it and it seems fi
Re:$ sudo rm -rf / === NPM install
by kayodelycaon on Tuesday November 09, 2021 @03:11PM
(#29166830)
Did it give you the this is dangerous message or a permissions error? If it’s the latter, you probably got stopped by System Integrity Protection.
Also, if you're willing to lean into npm a bit, there's tools that give a layer of protection over rm such as https://github.com/sindresorhus/trash-cli