-i
Very helpful. I was always tempted to sudo rm -rf /
, now I can finally do it without losing my home directory. (I’m just kidding)
If you want to protect a directory from a careless
rm -rf *
,touch
ing a file named-i
inside it will forcerm
to ask for confirmation :touch ~/important-directory/-i
From Command Line Fu, via HN.