Reusing names of critical system directories in subdirectories in your home dir.

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 dunno, ~/bin is a fairly common thing in my experience, not that it ends up containing many actual binaries. (The system started it, miss, honest. A quarter of the things in my system's /bin are text based.)
~/etc is seriously weird though. Never seen that before. On Debians, most of the user copies of things in /etc usually end up under ~/.local/ or at ~/.filenamehere
I think the home directory version of etc is ~/.config as per xdg.
Dumbfuck logged in as root.
So good to see that, even in 2026, Unix Haters' Handbook's part on rm is still valid. See page 59 of the pdf
“Just a little off the top please”
alias rm="rm -i"
alias rm=“echo no”
Let he who has not wrongly deleted system critical files in Linux cast the first stone.
I can do one better. A similar 'rm' command but while a Windows disk was mounted read/write. So, 2 OSes damaged in one command.
Amateurs. You all did it accidentally. I deleted system critical files intentionally believing it was beneficial.
/dev is just all bloat with stupid recursive directories
Whelp, time to restore the latest snapshot.
HAH rookie, I once forgot the . before the ./
Oof. I always type the whole path just because I have made this mistake before.
That doesn't protect you from typos.
rm -rv /home/schmuck /etc
"Whoops, I accidentally added a space."
I have three ways around this:
ls ~/etc ... <press up arrow, replace ls with rm -rv>ls ~/etc ... rm -rv !$As a noob, those little wrappers are great.
Things like these are right of passage on Linux :)
This is why you should setup daily snapshots of your system volumes.
Btrfs and ZFS exist for a reason.
Wish ZFS didn't constantly cause my proxmox to need to be forcefully restarted after the ZFS pool crashed randomly.
I get months of uptime on a ZFS NAS, though I'm not using Proxmox. I don't think it's the filesystem's fault, you might have some hardware issue tbh. Do you have some logs?
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.
Just get a cli trash tool and alias it to rm. Arch wiki
That's certainly something you can do! I would personally follow the recommendation against aliasing rm though, either just using the trash tool's auto complete or a different alias altogether.
Reason being as someone mentioned below: You don't want to give yourself a false sense of security or complacency with such a dangerous command, especially if you use multiple systems.
I liken it to someone starting to handle weapons more carelessly because the one they have at home is "never loaded." Better safe than sorry.
Lol we should have "rules of rm safety":
Yeah, there's no need to alias it. Trash-cli comes with its own trash command.
I think this is the best approach. I've created a short alias for my trash tool and also aliased rm to do nothing except print a warning. This way you train yourself to avoid using it. And if I really need it for some reason I can just type \rm.
If you want to train yourself even more effectively you can also alias rm to run sl instead :)
you can also alias
rmto runslinstead :)
Choo-choo!!
Hehe I just thought of a hilariously nefarious prank: alias ls to sl. 😂
DId you try CRTL-Z?
instructions on clear, switched to vi mode in bash and cant exit
Hint: :q!
Sister communities:
Community rules (click to expand)
1. Follow the site-wide rules
sudo in Windows.Please report posts and comments that break these rules!
Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.