Beware of inadvertent spaces in directory names when using rm -rf
, it can kill you without asking first.
I figured I would cleanup some junk piling up in several directories of my laptop: /tmp
, /var
, etc.
I accidentally hit the space-bar, causing this to appear at the prompt:
$ rm -rf /var /spool/...
And just when that little teenie space caught my attention, it was already too late. There was nothing else I could do but cry. Just for fun (and also hoping for a miracle) I rebooted my laptop, but it choked anyway.
Better be more careful next time.