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
[โ€“] nemith@programming.dev 1 points 2 weeks ago (1 children)

At a previous job I remember a PR to do essentially

temp=$(mktemp -d) mv $target $temp rm -r $temp &

I thought it was pretty clever. Obviously you would need to make sure mktemp is on the same filesystem (there are good flags to just use a dot file in the current directory). mv is atomic on most filesystems and then the & just runs the rm in the background .

[โ€“] bleistift2@sopuli.xyz 1 points 1 week ago

I fail to see the benefit of that script.