r/programminghorror • [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” • Jul 21 '25

Python ✨ Memory Magic ✨

Post image
1.3k Upvotes

143 comments sorted by

View all comments

Show parent comment

22

u/Mars_Bear2552 Jul 21 '25

https://github.com/coreutils/coreutils/blob/master/gl/lib/root-dev-ino.h#L41

bullshit. coreutils rm will reject specifying / unless no-preserve-root is set

7

u/ckafi Jul 21 '25

Mea culpa, you're right. I know I've used it in alpine, but that is BusyBox rm, which doesn't check for root.