sobriquet@aussie.zoneEnglish
1 yearI kinda thought they were in the wrong order, though: “rm -rf ~/“ should have been after “stopped thinking”.
Reminds me of the time when I bind mounted my home dir in a chroot, then
rm -rfed the chroot when I no longer needed it…- 1 year
Reminds me of the company where one of the top brass tried to unmount an important fileshare with rm. That was the day they found out that they didn’t have recent backups of a, shall we say disquieting, amount of important information and people’s work.
Staff started taking their own private backups of important things after that.
- 1 year
Wanted to reorganize my /mnt once and did an rm -r … without unmounting the network share of production.
We have backups now.
- 1 year
Same, I didn’t realize the directory I was deleting had a symlink to some root directory, at least until my mouse stopped working…
- 1 year
Gnome used to have a link to your homedir in its settings directory.
I imagine plenty of people had tons of fun with that. But you need to modify
rmto follow symlinks nowadays.
sobriquet@aussie.zoneEnglish
1 yearI fairly recently tried to do a
rm match*but accidentally put a space between thematchand the*…
- PastafARRian@lemmy.dbzer0.comdeleted by creator1 year
Looks like ChatGPT will create more software jobs than it takes.
- _____@lemm.eeEnglish1 year
AI will create the most cursed entry jobs humans have yet to see.
First job in the old days doing WordPress, managing someone’s vomit inducing PHP? Gone.
Jobs with jQuery spaghetti calling dozens of asp APIs like a rat’s nest no rat can traverse? Gone.
Welcome to the future: Fixing some “business” guy’s vibe coded personal hell made just for you.
- ulterno@programming.devEnglish1 year
Asking AI to make my website in C.
Who’s going to fix that “business” for me? BTW, the AI says, it’s 95% done and only needs some debugging, so you’ll be paid accordingly.
- friend_of_satan@lemmy.worldEnglish1 year
This is why the first thing I did when my company got us an agentic LLM was set up devcontainer.
- 1 year
I often use the phrase “that’s definitely an oopsie. Maybe even an oopsie daisy” at work
- 1 year
Should be
\~in most shells, certainly bash. Usemkdirandrmdirwhen messing around to prevent accidents.- 1 year
Saw this post this morning and was thinking about how to delete it ( while falling back asleep ). Escaping the ~, ofc that’d work! I feel so stupid now haha
True if these are installed, but if I’m on a server’s command line they probably aren’t.
A method not yet mentioned is by inode, (I’ve accidentally created filenames I didn’t know how to escape at the time like
--or other command line flags/special characters)ls -liOnce you get the inode
find . -type f -inum $inode -deleteI don’t understand the eagerness of most people to go nuclear by adding potentially dangerous arguments when not required.
Use
rmdirto remove a directory you expect to be empty, notrm -rfIt’s because they know how to use rm -rf, and they don’t know how to use rmdir. Honestly, I can’t think of a single time I’ve ever successfully removed a directory with rmdir. I always wind up using something else.
- 1 year
In these touchy cases always add ‘-i’ to have a confirmation when doing dangerous things. This will save your ass.
- ulterno@programming.devEnglish1 year
In case you are just testing it out, don’t use
-rf
Your~directory is most probably empty, so userm -dinstead, to prevent all footguns in case you put the wrong character in the end.-d, --dir remove empty directoriesI feel safe doing
rm -d /.
I feel safe doingsudo rm -d /.Because it won’t delete anything that has a file in it.
- 1 year
For when you want to delete everything in the root directory, but absolutely need to keep the directory itself.
- 1 year
So. Funny story. Back when I was incredibly new to Linux, I was trying to move everything from my downloads folder to somewhere else. So I navigated into the downloads directory on the command line and sent something like
“sudo mv /* ~/misc”
when I meant to type
“sudo mv ./* ~/misc”
Yea… That was a fun learning experience and hilarious way to utterly fuck everything on that machine. Luckily it was just an old laptop I’d installed Linux on to mess around and learn, no real damage done
- 1 year
You can definitely do this redirecting output. I did this to myself and sighed about 2 seconds into it after realizing what I had done.
- 1 year
Creating a ~ folder isn’t the tricky part. Removing it is.
(until you figure it out once)
- 1 year
I mean I have to wipe out my
~relatively frequently on some machines at times but that’s for “actual” “reasons”, LLM hallucinations not involved













