4 ms·
Not my code, but I was involved in cleaning up the aftermath. Financial company, a programmer had made a one line change to clean up some working directory at t
by ams6110 9y ago
Not my code, but I was involved in cleaning up the aftermath. Financial company, a programmer had made a one line change to clean up some working directory at the end of a program. Something like
"rm -rf /var/scratchdir /"
Yeah the space was a typo. Wasn't running as root but was able to make a pretty big mess regardless.
- kazinator 9y agoI did something like that in some code in a from-scratch embedded Linux distro, maybe nine years ago: rm -rf $MISPELED_ROOT_DIR/lib/ Oops, the script didn't have "set -u", and I happened to run that as root. So, /lib directory gone. I managed to recover that machine by copying libs from another one running the same distro.
- seanwilson 9y agoI move things to /tmp now instead of deleting them. Where the margin of error is a single character "rm" is just too risky.