I accidentally untarred archive intended to be extracted in root directory, which among others included some files for /etc directory.
I went on to rm -rv ~/etc, but I quickly typed rm -rv /etc instead, and hit enter, while using a root account.

you are viewing a single comment's thread
view the rest of the comments
[–] 3 points 8 months ago

If I'm about to run an rm with a slash in it, alarm bells go off in my head. I prefer to cd to the parent and then rm whatever without slashes in the name.

That didn't save me the other day when I accidentally put a space before an asterisk, but thankfully that wasn't in a place that was overly important.

Gotta retrain myself to look out for extra nothing now.

  • source
  • parent