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.
Reusing names of critical system directories in subdirectories in your home dir.

I agree with this take, don’t wanna blame the victim but there’s a lesson to be learned.
except if you read the accompanying text they already stated the issue by accidentally unpacking an archive to their user directory that was intended for the root directory. that’s how they got an etc dir in their user directory in the first place
I fucking hate using
rmfor these very reasons.There’s another program called “trash-cli” that gives you a
trashcommand instead of going straight to deletion.I’m not sure why more distros don’t include it by default, or why more tutorials don’t mention it.
HAH rookie, I once forgot the . before the ./
Reminds me in the t-shirt: “don’t drink and root”
OOOOOOOOOOOF!!
One trick I use, because I’m SUPER paranoid about this, is to mv things I intend to delete to /tmp, or make /tmp/trash or something.
That way, I can move it back if I have a “WHAT HAVE I DONE!?” moment, or it just deletes itself upon reboot.
Next time:
ls ~/etc rm -rv !$Or press
alt+.to paste final argument of previous command




