3 ms·
An inconsistently applied sanity check creates a false sense of security. Like how a safety barrier that isn't strong enough to take someone's weight might be w
by lmm 6y ago
An inconsistently applied sanity check creates a false sense of security. Like how a safety barrier that isn't strong enough to take someone's weight might be worse than no barrier.
- fiddlerwoaroof 6y agoYeah, some people recommend something like alias rm=‘rm -i’ Unfortunately, as soon as you’re on another computer or at someone else’s shell, you’ll be more comfortable thinking less about rm-ing things and the sanity check won’t be there.
- pwg 6y agoThe better recommendation is to alias rm -i to del: alias del='rm -i' And then get in the habit of using 'del' unless you really want a no-confirmation delete. Then when you are on another computer or at someone else's shell you get: del: command not found Instead of having a bunch of files silently deleted.
- fiddlerwoaroof 6y agoAnother trick is to run touch —- -i In important directories. Then rm -rf * expands to rm -rf .... -i ... and you get the “are you sure” prompt.
- thaumasiotes 6y agoThis strategy will fail pretty badly if you're on someone else's computer using Windows or DOS, where 'del' is the delete command.
- happymellon 6y agoDoes `del -rf /` do a lot on Windows?
- thaumasiotes 6y agoI doubt it, but `del *` should do the same thing on both systems.
- pwg 6y agoExcept that on windows, "del" defaults to prompting "are you sure" when one types "del *".
- Ensorceled 6y agoRight, I understand the concept. What I'm saying is that a safety barrier that sometimes doesn't work is better than rails that always guide you off a cliff; which is currently the YouTube model.