kali_fornication@lemmy.world to linuxmemes@lemmy.world · 2 months agothis command saves liveslemmy.worldimagemessage-square45linkfedilinkarrow-up1551arrow-down112
arrow-up1539arrow-down1imagethis command saves liveslemmy.worldkali_fornication@lemmy.world to linuxmemes@lemmy.world · 2 months agomessage-square45linkfedilink
minus-squarez3rOR0ne@lemmy.mllinkfedilinkarrow-up2·2 months agoOh god…why would you not just cd .. and rm -r the directory name?
minus-squareWhyJiffie@sh.itjust.workslinkfedilinkEnglisharrow-up6·2 months 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·2 months agoFair enough. Then why not cd .., rm ./dir_name/* ?
minus-squareWhyJiffie@sh.itjust.workslinkfedilinkEnglisharrow-up7·2 months agobecause that does not delete hidden files in the directory
minus-squarez3rOR0ne@lemmy.mllinkfedilinkarrow-up1·2 months agoFair enough. Why not tack on rm ./.* as well to that list? Lol. Sorry, I’m truly just curious and not trying to be a smart alec.
minus-squareWhyJiffie@sh.itjust.workslinkfedilinkEnglisharrow-up7·2 months agowith that we arrive at the original problem: depending on your shell and its configuration, .. could be part of the results of the glob expansion. so at that point why bother stepping one dir level up
minus-squarez3rOR0ne@lemmy.mllinkfedilinkarrow-up1·2 months agoAh I see. Very interesting! Thank you.
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/*?because that does not delete hidden files in the directory
Fair enough. Why not tack on
rm ./.*as well to that list? Lol. Sorry, I’m truly just curious and not trying to be a smart alec.with that we arrive at the original problem: depending on your shell and its configuration,
..could be part of the results of the glob expansion. so at that point why bother stepping one dir level upAh I see. Very interesting! Thank you.