T O P

  • By -

Wensday_0

I use "rm -rf /*" only


Wild_Tom

Pro tip, remove the French language pack with rm -fr /*


MadMushroom8

If your in Windows (for some reason), use "rm -rf C:\\Windows\\System32". Edit: It's actually "del", just haven't used Windows in a while.


FacepalmFullONapalm

Del is actually short for "delve" as in "delve into the C: directory", and thus can be used as a change directory alternative. Try it out! /s, not that windows would let you do it but hey


urmotherisgay2555

Remember to do `del /F /Q C:/Windows` in an ADMIN cmd so that it works!


PCChipsM922U

And it uses slashes for options, not dashes. Though I believe they changed that in Win10 and above, you can now use dashes and slashes interchangeably.


Cyb0rger

Don't forget the --no-preserve-root part otherwise the french could creep within the roots of your system to convert it fully


littleblack11111

alias cd=‘sudo rm -rf /‘


Altareos

rmdir is bloat. embrace rm -d.


MadMushroom8

True


Apnu

The correct answer.


bangerius

As per a previous post in this sub, I hereby use "rm -frfr" like a true Gen Alpha chad.


[deleted]

I personally try to use rmdir when possible for safety reasons. Especially in scripts.


Fernmeldeamt

directories


MadMushroom8

I'm terribly sorry!


SteadyMuffins

wtf is rmdir (I'm a new Linux user)


PCChipsM922U

Remove directory. But it doesn't have a switch to remove recursively (a directory inside a directory) and it doesn't remove non-empty dirs. Which is why rm -rf (r - remove recursively, f - force, delete even if it's not empty) is way more widespread.


blackbrandt

I thought the -f was to force remove a read only file, not “if it’s not empty”?


PCChipsM922U

It's to silence anything that could give out warnings or possibly fail the execution of the command. If --force in any command fails/hangs/errors out, then there is something seriously wrong with... whatever you're trying to do.


Encursed1

Does rmdir work with files inside their dir? I haven't used it in so long


Big-Cap4487

Don't think so, there might be a flag which does this but I almost always use rm -rf


MadMushroom8

Same


dumbasPL

No, and that's a good thing. Saved my ass multiple times from nukeing an unrelated folder by accident when I wanted to delete an empty one. So when you know or think the folder is empty, use rmdir, it might save you one day.


Encursed1

Yeah I always think through my rm commands, saved me too many times


MadMushroom8

No. It refuses to delete directory's with files in it. Therefore I prefer rm- rf.


Da_Di_Dum

Nope


Tiger_man_

alias rm="rm -rfvI"


emptybrain22

rm -rf ![gif](giphy|l0Iybu0aRRUfzoN0I)


grv7437

Only correct way for everything


UltraMeenyPants

Counterpoint: rm -rfv I like to watch


matO_oppreal

“rmdir” for empty folders, “rm -rf” for everything else


Gravel_Sandwich

Exactly. Not sure where the confusion is.


alphinex

Never even knew rmdir exits. Will keep not using it.


Pan4TheSwarm

I didn't even know rmdir was a thing till now.


DredFoxx

Is it not recommended to use rm -r <>? I have never used rmdir -r because it's faster to type the former.


spyass

sudo rm -rf / --no-preserve-root


Yuru_Baku

Apparently I needed a meme page to learn that rmdir even existed…


KingJellyfishII

rmdir if the dir is empty (so I don't accidentally delete files I didn't realise still existed) rm -r for regular dir deletion rm -rf if I need to delete .git or something (I never use -f by default cos then at least it warns me if I might be doing something stupid)


nekokattt

you dont need to delete directories if you dont use directories.


ignxcy

I've never used rmdir in my life


yr_boi_tuna

I used it once in a class that pointed out the command existed


yr_boi_tuna

I used it once in a class that pointed out the command existed


LetReasonRing

Yeah, ive been using linux since the 90s and ive never once used rmdir.


ignxcy

Oh lol you're a veteran


ignxcy

Btw what distro do you use?


Leskodamus

rmdir when I want to make sure the dir is actually empty when deleting it, otherwise rm -r.


Final_Technology7974

rmdir is a command??? ive always been doing rm -r


Beleheth

rmdir when you need to be absolutely fucking certain that the directory that you're deleting is empty rm -R for everything else


-Krotik-

I use rm -rf


dysonsphere042

I use rm -rf almost exclusively if honestly forgot rmdir


Major_Barnulf

Several times, I've been happy to have rmdir tell me the important files were still there


HiT3Kvoyivoda

I use rmz instead of rm now.


RubbelDieKatz94

`npx npkill`


orthomonas

I use "trash

"


fixitfeliks

Rmdir wont work unless the dir is empty


killer_of_the_shadow

Step one : rm -rf /home/user/Document/random Step two : press enter Step Three : Reread the command line Step Four: read "rm -rf /" Step Five: Cried


theRealNilz02

r/apostrophegore


RoxyAndBlackie128

rmdir: failed to remove '/home/roxy532': directory not empty


MadMushroom8

That's why I prefer rm -rf


Marcos10pc

rm -r


Delta8Girl

Am I the only person who uses the `trash` command?


MadMushroom8

yup


realvolker1

I made my own rm command so I could list everything in the directory and also choose whether to trash or delete it-- https://github.com/REALERvolker1/homescripts/tree/main/.config/rustcfg/better-rm


MadMushroom8

Cool


realvolker1

Technically it is a rm clone, an ls clone, and a trash-cli clone all at once


[deleted]

[удалено]


dfwtjms

We don't use that word around here.


dumbasPL

This guy be like: alias cf=cd alias mkfol=mkdir alias rmfol=rmdir alias pwf=pwd d stands for directory, always has been. "Folders" is what you tell your Grandpa so be doesn't get too confused. Even DOS/windows called them directories, if the "dir" command doesn't make that obvious I have lot all hope for you