this post was submitted on 09 Jan 2026
127 points (97.7% liked)

Programmer Humor

40120 readers
2 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 6 years ago
MODERATORS
 

๐Ÿ’€โ˜ ๏ธ

you are viewing a single comment's thread
view the rest of the comments
[โ€“] T156@lemmy.world 4 points 2 weeks ago

Though the check isn't very sophisticated, if memory serves. It more or less checks whether / is passed to rm -r.

If you did something like rm -r $VAR/*, but didn't check to make sure that $VAR was set and not empty, it could still fire, since rm wouldn't see that root got passed, only a bunch of directories in root.