James G. Sack (jim) wrote:
Another practical recommendation:
Never include _any_ paths in a rm -rf command
I disagree.
The idea: if you _never have any slash_ in the command then you can't
accidentally get a disaster such as could happen with inadvertent
spaces, such as
rm -rf / path/to/somedir .. would operate on '/' OOPS
That isn't my normal "rm -rf" failure mode. In fact, I don't think I
have *ever* made that mistake. The whole "/" followed by " " <space>
just isn't in the muscle memory of my fingers.
In fact, when operating as root, I almost *always* use a full path
because the tab completion actually helps verify that I'm nuking what I
want to nuke.
My failure mode is:
"rm -rf . something"
". " is a common enough pattern that I don't automatically think about
it. If you forget you are sitting in "/"--bye, bye, system.
-a
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list