- cross-posted to:
- programmer_humor@programming.dev
- cross-posted to:
- programmer_humor@programming.dev
CommitStrip | website
Transcript
7 panel comic
1: [2 guys, both in fur lined coats, one wearing a fur-lined hat, the other with crazy hair, sit in circular booth in a rundown bar. 2 empty shot glasses and a bottle are visible on the table.]
Hat: Stop it, you’re crazy! This isn’t you talking, it’s the vodka!
Hair: Leave it…
2: [The two men are sitting across from a third man in a similar fur-line coat and hat, but glasses and a beard. A laptop sits in front of the bearded man.]
Beard: It’s not a game for cowards…
3: [Hair pulls the laptop towards him. Hat looks worried]
Hair: Come on, gimme that and let’s get it over with!
4: [Hair has a crazy and excited look on his face]
Hair: Each one on his own prod server?
Beard: Each one on his own prod server.
5: [Close up of Hats finger clicking the touch pad]
6: [Close up of the sweat dripping down Hats face]
7: [A terminal is open on the laptop screen]
Laptop reads:
root@server:~# [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “Lucky boy”;


needs —no-preserve-root
On modern Linux system yes but old Unix servers (or even recent?) would run it no problem
Edit:
It was initally introduced by sun microsystems in 2005 and was later adopted by GNUSun Microsystem didn’t introduce it in 2005, rather it simply disallowed rm -rf / altogether
Later GNU introduced --preserve-root and after that made --preserve-root the default and added --no-preserve-root https://en.wikipedia.org/wiki/Rm_(Unix)
Except Alpine and other systems with BusyBox
And also a short delay before printing ‘lucky boy’ so you can’t tell if it’s deleting everything or if it’s the built in delay.
Oh I do remember that sickening feeling when an
rmdoesn’t come back immediately –_—I still remember when I managed to rm -rf / foo (I accidentally typed a space between / and foo) on my very early linux box on the 90s. 80486, 16 mb
I pressed enter. Saw what I did. Remembered that sync ran at every 30s* Pressed the power button.
*= those were simple times, but not better times
So I rm -rf ed my root fs and my box survived it due to the quick power off.
That’s brilliant…and sick.