Comment on sudo rm -rf /
hayvan@piefed.world 9 hours agoYes, that’s how I nuked my workstation once. Part of my development routine was running sudo rm -rf $SDCARD/*. Guess what happens when SDCARD isn’t defined.
Comment on sudo rm -rf /
hayvan@piefed.world 9 hours agoYes, that’s how I nuked my workstation once. Part of my development routine was running sudo rm -rf $SDCARD/*. Guess what happens when SDCARD isn’t defined.
pivot_root@lemmy.world 7 hours ago
set -uis your friend. Unless you’re running that command interactively, in which case it just exits the shell without giving any warning at all. Oh, the joys of shells written to be compatible with scripts created 20 years ago…hayvan@piefed.world 3 hours ago
It was interactive, but thanks, killing the shell is still better than reinstalling the machine.