4 ms·
GNU rm has exactly that built-in: $ rm -rf / rm: it is dangerous to operate recursively on ‘/’ rm: use --no-preserve-root to override this failsafe
by rwos 11y ago
GNU rm has exactly that built-in:
$ rm -rf /
rm: it is dangerous to operate recursively on ‘/’
rm: use --no-preserve-root to override this failsafe
- amelius 11y agoThe problem with this kind of safety nets is that it may break scripts that rely on this to work.
- erydo 11y agoHow many daily-use scripts do you suppose intentionally run `rm -rf /`? Cost-benefit for common use seams clearly in favour of adding a failsafe.
- Lambdanaut 11y agoIt's a good thing you can fix the script by adding that flag into them.
- tombrossman 11y agoGo on, fire up a cheap VPS somewhere like DigitalOcean and run "rm -rf / --no-preserve-root". Maybe I am too easily amused but as a long-time Linux user on the desktop this is one of those things I always wanted to try. After it runs, you can't even shut down or run anything else, you just kill the SSH session.