My submission to the "shortest horror story" competition (not a real competition; also, the plot is banal and highly predictable):

sudo rm -rf .cache /

@nina_kali_nina Does that evade the no-preserve-root requirement?

@nina_kali_nina that is a horror Story for MacOS and BSD users.

It's a comedy for GNU users 😉

@nina_kali_nina
I started to colour code my root sessions after I typed "mv * ~/backup/2002" into a root window in the root directory, instead of a user session in last semester's work directory.

Rebuilding after that _sucked_.

@silvermoon82 @nina_kali_nina That seems very familiar. 30 years ago, on the company mail server. My first real fuckup 😅
@agturcz @nina_kali_nina
Oh nooo! At least mine was my personal machine!
@silvermoon82 @nina_kali_nina Fortunately, I had a freshly made full backup, capability to restore it, and still some time left on the night shift before people came to work. But yeah, I remember this feeling of "oh, fuck, what I should do now, THINK!" 😅

@nina_kali_nina it took me too long to realse what was wrong with that command 😂 the horror 😱

I did that to a system once for fun to see how far it'd get before things just went entirely sideways, I kinda recall it got actually quite a long way. (A but fuzzy on the memory, was maybe 2 decades ago!)

@nina_kali_nina Season 2: Ctr+C -> Ctr+Alt+V
@nina_kali_nina ouch. How quickly did you press Ctrl+c?

@rebtoor this story is fiction and does not bear any resemblance to real people or events.

diskutil eraseVolume free free disk0s4

though? :D

@nina_kali_nina tbf most rm implementations will refuse to remove / unless you use –no-preserve-root

my submission: doas rm -rf /mnt/b /*, roughly the command which I executed on June 10th, 2017

I remember the date because that became the de-facto “epoch” on sakamoto, and a lot of files still bear that mark. that was a very important lesson, thank glob for extundelete

@nina_kali_nina welp. you might get some time to think your way out of this situation... if you have magnetic disks, and your cache is full.
no horror on #openbsd

# rm -rf /
rm: "/" may not be removed
#
...just checked: looks like root is protected on all modern versions of bsd, macos, and linux. sorry for breaking the horror story :)
@hi --no-preserve-root? Or is this a linuxism?
no such thing on #openbsd. rm(1)

see also

@nina_kali_nina

One of my first IT jobs was fixing a Windows 98 PC where someone had accidentally dragged and dropped the contents of C:\windows into c:\temp and thought they had a virus because all their desktop icons and start menu disappeared. Windows 98 did an admirable job of still trying to keep running, until they helpfully tried restarting it

@nina_kali_nina How about a short horror 'C' program ?
main(){fork();main();}
@nina_kali_nina that's the cause, but the effect is what you have to fear
ls: not found
@nina_kali_nina Mine was `git rm *` on a newly created repository for one of my first uni weekly projects (I was trying to unstage some trash files and didn't know about `.gitignore`). By failing to specify `--cached`, it proceeded to delete my entire project. I wasn't too familiar with Git at the time, so I had not commited anything yet, and had to redo the entire thing from scratch 😖

@nina_kali_nina
I knew a fellow that did this as root:

# chmod 644 /

For real. But he learned the lesson and it was in the 90:s at a sunOS system, not Linux.