3 ms·
I found a new variation recently. Luckily all my code was checked in. Meant to type: rm -rf node_modules && npm install Question: what's immediately ne
by hinkley 8y ago
I found a new variation recently. Luckily all my code was checked in.
Meant to type:
rm -rf node_modules && npm install
Question: what's immediately next to the & key on a keyboard?
Answer: *
Actually typed
rm -rf node_modules ** npm install
Oops.
- nothrabannosir 8y agoIf you’re on Mac OS X , try installing the “trash” app (from brew iirc) and retrain yourself to never use bare rm anymore. There’s probably similar tools on Linuxes. Theory is: rm is dangerous and should not be used day to day.
- mynewtb 8y agoOr simply have local, quick, regular and tested backups.
- dzamo_norton 8y agoUsing btrfs on Linux I have a job that takes a CoW snapshot of the whole filesystem every 10 minutes just so that I can undo whoopsies. I don't retain all of these snapshots, only the most recent one.