3 ms·
I was on call “back in the day” when a customer rang to tell me that she’d meant to type: # find /tmp -exec rm {} /; But instead she’d typed # find /
by doctor_eval 5y ago
I was on call “back in the day” when a customer rang to tell me that she’d meant to type:
# find /tmp -exec rm {} /;
But instead she’d typed
# find / tmp -exec rm {} /;
I learned a lot about Unix (and, as it happens, X windows) file systems that week. Note that this was long before tools like sudo existed, where cleaning up tmp was often a manual process.
There is no way we could blame a person for a single keystroke error - it’s crazy that the command worked - but I now look at the find command with an enormous amount of fear.
- BonoboIO 5y agoGood old days deleting an entire server ... learned that the hard way.
- Bender 5y agoI ran into a similar one a few times from the same team that kept doing things in their scripts like rm -rf ${basedir}/* without setting set -u to exit if there are undefined variables. I suggested a few other sanity checks but was told I was adding friction.