3 ms·
Standard rm (coreutils) has included rootfs protections since at least 2012: --no-preserve-root do not treat '/' specially --preserve-root
by dredmorbius 7y ago
Standard rm (coreutils) has included rootfs protections since at least 2012:
--no-preserve-root
do not treat '/' specially
--preserve-root
do not remove '/' (default)
https://manpages.debian.org/stretch/coreutils/rm.1.en.html https://manpages.debian.org/stretch/coreutils/rm.1.en.html
Mind that if your rm comes from elsewhere (say, Busybox), it may not have that protection.
Very careful use of rm as root is an excellent habit to cultivate.
As are backups.
- ex3xu 7y agoInteresting, I didn't know that and I stand corrected.
- Dylan16807 7y agoWhat about it? I don't think that does anything for "/*"