kali_fornication@lemmy.world to linuxmemes@lemmy.world · 8 hours agothis command saves liveslemmy.worldimagemessage-square32fedilinkarrow-up1309arrow-down14
arrow-up1305arrow-down1imagethis command saves liveslemmy.worldkali_fornication@lemmy.world to linuxmemes@lemmy.world · 8 hours agomessage-square32fedilink
minus-squareJasonDJ@lemmy.ziplinkfedilinkarrow-up33·edit-25 hours agoDon’t forget the dot files and directories. Use sudo in case of trouble…sudo rm -rf .* (Don’t actually do this, because some shells will take that to include . and .. recursively)
minus-squareScafir@discuss.tchncs.delinkfedilinkarrow-up21·3 hours agoOh god, I never considered that .* could theoretically match ... Thanks fish for not doing that, more than likely saved my unknowing ass a couple of times
minus-squareblack_flag@lemmy.dbzer0.comlinkfedilinkarrow-up5·2 hours agoSomeone please find me an example of a real shell that does this cuz I don’t believe it.
minus-squareJasonDJ@lemmy.ziplinkfedilinkarrow-up2·2 hours agoIt happened to me once. It was probably an old version of bash or possibly even just sh.
minus-squareDirectorAutumn@lemmy.worldlinkfedilinkarrow-up1·2 hours agoWhen your wiping recycle bin and then run that command…
minus-squarez3rOR0ne@lemmy.mllinkfedilinkarrow-up0·2 hours agoOh god…why would you not just cd .. and rm -r the directory name?
minus-squareWhyJiffie@sh.itjust.workslinkfedilinkEnglisharrow-up2·2 hours agoBecause you don’t always want to delete the directory itself, to then recreate it and set the ownerships and permissions again
minus-squarez3rOR0ne@lemmy.mllinkfedilinkarrow-up0·1 hour agoFair enough. Then why not cd .., rm ./dir_name/* ?
Don’t forget the dot files and directories. Use sudo in case of trouble…
sudo rm -rf .*(Don’t actually do this, because some shells will take that to include
.and..recursively)Oh god, I never considered that
.*could theoretically match... Thanks fish for not doing that, more than likely saved my unknowing ass a couple of timesSomeone please find me an example of a real shell that does this cuz I don’t believe it.
It happened to me once. It was probably an old version of bash or possibly even just sh.
When your wiping recycle bin and then run that command…
Oh god…why would you not just
cd ..andrm -rthe directory name?Because you don’t always want to delete the directory itself, to then recreate it and set the ownerships and permissions again
Fair enough. Then why not
cd ..,rm ./dir_name/*?