gun@lemmy.ml to Linux@lemmy.mlEnglish · 1 month agoTried to rm -r my .cache but accidentally did .config instead...message-squaremessage-square18fedilinkarrow-up11arrow-down10file-text
arrow-up11arrow-down1message-squareTried to rm -r my .cache but accidentally did .config instead...gun@lemmy.ml to Linux@lemmy.mlEnglish · 1 month agomessage-square18fedilinkfile-text
minus-squareExtremeDullard@lemmy.sdf.orglinkfedilinkarrow-up0·1 month agoHere’s a rule I learned the hard way a few decades ago: If you type “rm”, take you hands off the keyboard and take one deliberate breath before continuing your command. If you then type “-r”, do it again. If you then type “-f” do it again. In all cases, re-read what you wrote before hitting ENTER.
minus-squaresuperkret@feddit.orglinkfedilinkarrow-up1·21 days agoAlso, triple-check which machine you’re actually logged into.
minus-squarexor@lemmy.blahaj.zonelinkfedilinkEnglisharrow-up0·1 month agoI’m a big fan of starting the command with a #, then removing it once I’m happy with the command to defend against accidentally hitting enter Putting ~ next to the enter key on keyboards (at least UK ones) was an evil villain level decision
minus-squareZykino@programming.devlinkfedilinkarrow-up0·1 month agoWhen I’m unsure, I ls <the-glob>, chek, then replace ls with rm.
minus-squaretorgeir@lemmy.mllinkfedilinkarrow-up1·1 month agoThis. When the ls command works, hit ctrl-a, meta-d, type rm, enter.
Here’s a rule I learned the hard way a few decades ago:
Also, triple-check which machine you’re actually logged into.
I’m a big fan of starting the command with a
#
, then removing it once I’m happy with the command to defend against accidentally hitting enterPutting
~
next to the enter key on keyboards (at least UK ones) was an evil villain level decisionWhen I’m unsure, I
ls <the-glob>
, chek, then replacels
withrm
.This. When the ls command works, hit ctrl-a, meta-d, type rm, enter.