β² 544 βΌ this command saves lives (thelemmy.club) submitted 5 months ago by kali_fornication@lemmy.world to c/linuxmemes@lemmy.world 46 comments fedilink hide all child comments
[β] JasonDJ@lemmy.zip 54 points 5 months ago* (3 children) 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) permalink fedilink source hideshow 6 child comments replies: [β] Scafir@discuss.tchncs.de 38 points 5 months ago (1 child) 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 times permalink fedilink source parent hideshow 2 child comments replies: [β] black_flag@lemmy.dbzer0.com 20 points 5 months ago (1 child) Someone please find me an example of a real shell that does this cuz I don't believe it. permalink fedilink source parent hideshow 2 child comments replies: [β] JasonDJ@lemmy.zip 4 points 5 months ago It happened to me once. It was probably an old version of bash or possibly even just sh. permalink fedilink source parent [β] z3rOR0ne@lemmy.ml 2 points 5 months ago (1 child) Oh god...why would you not just cd .. and rm -r the directory name? permalink fedilink source parent hideshow 2 child comments replies: [β] WhyJiffie@sh.itjust.works 6 points 5 months ago (1 child) Because you don't always want to delete the directory itself, to then recreate it and set the ownerships and permissions again permalink fedilink source parent hideshow 2 child comments replies: [β] z3rOR0ne@lemmy.ml 0 points 5 months ago (1 child) Fair enough. Then why not cd .., rm ./dir_name/* ? permalink fedilink source parent hideshow 2 child comments replies: [β] WhyJiffie@sh.itjust.works 7 points 5 months ago (1 child) because that does not delete hidden files in the directory permalink fedilink source parent hideshow 2 child comments replies: [β] z3rOR0ne@lemmy.ml 1 point 5 months ago (1 child) 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. permalink fedilink source parent hideshow 2 child comments replies: [β] WhyJiffie@sh.itjust.works 7 points 5 months ago (1 child) 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 up permalink fedilink source parent hideshow 2 child comments replies: [β] z3rOR0ne@lemmy.ml 1 point 5 months ago Ah I see. Very interesting! Thank you. permalink fedilink source parent [β] DirectorAutumn@lemmy.world 1 point 5 months ago When your wiping recycle bin and then run that command... permalink fedilink source parent
[β] Scafir@discuss.tchncs.de 38 points 5 months ago (1 child) 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 times permalink fedilink source parent hideshow 2 child comments replies: [β] black_flag@lemmy.dbzer0.com 20 points 5 months ago (1 child) Someone please find me an example of a real shell that does this cuz I don't believe it. permalink fedilink source parent hideshow 2 child comments replies: [β] JasonDJ@lemmy.zip 4 points 5 months ago It happened to me once. It was probably an old version of bash or possibly even just sh. permalink fedilink source parent
[β] black_flag@lemmy.dbzer0.com 20 points 5 months ago (1 child) Someone please find me an example of a real shell that does this cuz I don't believe it. permalink fedilink source parent hideshow 2 child comments replies: [β] JasonDJ@lemmy.zip 4 points 5 months ago It happened to me once. It was probably an old version of bash or possibly even just sh. permalink fedilink source parent
[β] JasonDJ@lemmy.zip 4 points 5 months ago It happened to me once. It was probably an old version of bash or possibly even just sh. permalink fedilink source parent
[β] z3rOR0ne@lemmy.ml 2 points 5 months ago (1 child) Oh god...why would you not just cd .. and rm -r the directory name? permalink fedilink source parent hideshow 2 child comments replies: [β] WhyJiffie@sh.itjust.works 6 points 5 months ago (1 child) Because you don't always want to delete the directory itself, to then recreate it and set the ownerships and permissions again permalink fedilink source parent hideshow 2 child comments replies: [β] z3rOR0ne@lemmy.ml 0 points 5 months ago (1 child) Fair enough. Then why not cd .., rm ./dir_name/* ? permalink fedilink source parent hideshow 2 child comments replies: [β] WhyJiffie@sh.itjust.works 7 points 5 months ago (1 child) because that does not delete hidden files in the directory permalink fedilink source parent hideshow 2 child comments replies: [β] z3rOR0ne@lemmy.ml 1 point 5 months ago (1 child) 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. permalink fedilink source parent hideshow 2 child comments replies: [β] WhyJiffie@sh.itjust.works 7 points 5 months ago (1 child) 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 up permalink fedilink source parent hideshow 2 child comments replies: [β] z3rOR0ne@lemmy.ml 1 point 5 months ago Ah I see. Very interesting! Thank you. permalink fedilink source parent
[β] WhyJiffie@sh.itjust.works 6 points 5 months ago (1 child) Because you don't always want to delete the directory itself, to then recreate it and set the ownerships and permissions again permalink fedilink source parent hideshow 2 child comments replies: [β] z3rOR0ne@lemmy.ml 0 points 5 months ago (1 child) Fair enough. Then why not cd .., rm ./dir_name/* ? permalink fedilink source parent hideshow 2 child comments replies: [β] WhyJiffie@sh.itjust.works 7 points 5 months ago (1 child) because that does not delete hidden files in the directory permalink fedilink source parent hideshow 2 child comments replies: [β] z3rOR0ne@lemmy.ml 1 point 5 months ago (1 child) 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. permalink fedilink source parent hideshow 2 child comments replies: [β] WhyJiffie@sh.itjust.works 7 points 5 months ago (1 child) 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 up permalink fedilink source parent hideshow 2 child comments replies: [β] z3rOR0ne@lemmy.ml 1 point 5 months ago Ah I see. Very interesting! Thank you. permalink fedilink source parent
[β] z3rOR0ne@lemmy.ml 0 points 5 months ago (1 child) Fair enough. Then why not cd .., rm ./dir_name/* ? permalink fedilink source parent hideshow 2 child comments replies: [β] WhyJiffie@sh.itjust.works 7 points 5 months ago (1 child) because that does not delete hidden files in the directory permalink fedilink source parent hideshow 2 child comments replies: [β] z3rOR0ne@lemmy.ml 1 point 5 months ago (1 child) 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. permalink fedilink source parent hideshow 2 child comments replies: [β] WhyJiffie@sh.itjust.works 7 points 5 months ago (1 child) 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 up permalink fedilink source parent hideshow 2 child comments replies: [β] z3rOR0ne@lemmy.ml 1 point 5 months ago Ah I see. Very interesting! Thank you. permalink fedilink source parent
[β] WhyJiffie@sh.itjust.works 7 points 5 months ago (1 child) because that does not delete hidden files in the directory permalink fedilink source parent hideshow 2 child comments replies: [β] z3rOR0ne@lemmy.ml 1 point 5 months ago (1 child) 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. permalink fedilink source parent hideshow 2 child comments replies: [β] WhyJiffie@sh.itjust.works 7 points 5 months ago (1 child) 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 up permalink fedilink source parent hideshow 2 child comments replies: [β] z3rOR0ne@lemmy.ml 1 point 5 months ago Ah I see. Very interesting! Thank you. permalink fedilink source parent
[β] z3rOR0ne@lemmy.ml 1 point 5 months ago (1 child) 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. permalink fedilink source parent hideshow 2 child comments replies: [β] WhyJiffie@sh.itjust.works 7 points 5 months ago (1 child) 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 up permalink fedilink source parent hideshow 2 child comments replies: [β] z3rOR0ne@lemmy.ml 1 point 5 months ago Ah I see. Very interesting! Thank you. permalink fedilink source parent
[β] WhyJiffie@sh.itjust.works 7 points 5 months ago (1 child) 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 up permalink fedilink source parent hideshow 2 child comments replies: [β] z3rOR0ne@lemmy.ml 1 point 5 months ago Ah I see. Very interesting! Thank you. permalink fedilink source parent
[β] z3rOR0ne@lemmy.ml 1 point 5 months ago Ah I see. Very interesting! Thank you. permalink fedilink source parent
[β] DirectorAutumn@lemmy.world 1 point 5 months ago When your wiping recycle bin and then run that command... permalink fedilink source parent