Sjmarf to Programmer Humor@programming.devEnglish • 3 months agoOh no! 🤦♂️sh.itjust.worksimagemessage-square54fedilinkarrow-up1981arrow-down19
arrow-up1972arrow-down1imageOh no! 🤦♂️sh.itjust.worksSjmarf to Programmer Humor@programming.devEnglish • 3 months agomessage-square54fedilink
minus-square@floquant@lemmy.dbzer0.comlinkfedilink29•3 months 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-square@zarkanian@sh.itjust.workslinkfedilink1•3 months 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-square@xav@programming.devlinkfedilink10•3 months agoIn these touchy cases always add ‘-i’ to have a confirmation when doing dangerous things. This will save your ass.
minus-square@Atherel@lemmy.dbzer0.comlinkfedilink2•3 months agowhy -exec rm when find has a -delete flag?
minus-square@barsoap@lemm.eelinkfedilink4•3 months agoIs that some new-fangled GNU thing? It’s certainly not POSIX.
minus-square@Atherel@lemmy.dbzer0.comlinkfedilink5•3 months 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.