Sjmarf@sh.itjust.works to Programmer HumorEnglish · 2 days agoOh no! 🤦♂️sh.itjust.worksimagemessage-square51linkfedilinkarrow-up1940arrow-down19
arrow-up1931arrow-down1imageOh no! 🤦♂️sh.itjust.worksSjmarf@sh.itjust.works to Programmer HumorEnglish · 2 days agomessage-square51linkfedilink
minus-squarefloquant@lemmy.dbzer0.comlinkfedilinkarrow-up29·2 days agoI don’t understand the eagerness of most people to go nuclear by adding potentially dangerous arguments when not required. Use rmdir to remove a directory you expect to be empty, not rm -rf
minus-squarezarkanian@sh.itjust.workslinkfedilinkarrow-up1·1 day agoIt’s because they know how to use rm -rf, and they don’t know how to use rmdir. Honestly, I can’t think of a single time I’ve ever successfully removed a directory with rmdir. I always wind up using something else.
minus-squarexavlinkfedilinkarrow-up10·2 days agoIn these touchy cases always add ‘-i’ to have a confirmation when doing dangerous things. This will save your ass.
minus-squareAtherel@lemmy.dbzer0.comlinkfedilinkarrow-up2·2 days agowhy -exec rm when find has a -delete flag?
minus-squarebarsoap@lemm.eelinkfedilinkarrow-up4·2 days agoIs that some new-fangled GNU thing? It’s certainly not POSIX.
minus-squareAtherel@lemmy.dbzer0.comlinkfedilinkarrow-up5·2 days agoOh, for once the BSD version has more options than the GNU one.
deleted by creator
I don’t understand the eagerness of most people to go nuclear by adding potentially dangerous arguments when not required.
Use
rmdir
to remove a directory you expect to be empty, notrm -rf
It’s because they know how to use rm -rf, and they don’t know how to use rmdir. Honestly, I can’t think of a single time I’ve ever successfully removed a directory with rmdir. I always wind up using something else.
In these touchy cases always add ‘-i’ to have a confirmation when doing dangerous things. This will save your ass.
why
-exec rm
when find has a -delete flag?Is that some new-fangled GNU thing? It’s certainly not POSIX.
Oh, for once the BSD version has more options than the GNU one.