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.

  • I Cast Fist@programming.dev
    link
    fedilink
    arrow-up
    4
    ·
    9 hours ago

    After being bitten by rm a few times, the impulse rises to alias the rm command so that it does an rm -i” or, better yet, to replace the rm command with a program that moves the files to be deleted to a special hidden directory, such as ~/.deleted. These tricks lull innocent users into a false sense of security.