LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Absolutely one of the worst commands in Linux! (https://www.linuxquestions.org/questions/linux-general-1/absolutely-one-of-the-worst-commands-in-linux-478138/)

ramram29 08-28-2006 12:39 PM

Absolutely one of the worst commands in Linux!
 
Login as root then type:

rm -rf /




DON'T DO THIS! IT'LL DELETE EVERYTHING!

Can you think of any other renegade commands?

MensaWater 08-28-2006 12:45 PM

Thousands.

Linux unlike Windoze expects the user to be careful and won't ask: "Are you sure?" then ask "Are you really sure?" and finally ask "Are you really really sure?" before doing every task.

You can emulate this behavior if you really want by always using the -i flag with rm and never using the -f flag. Even then it will only ask you once for each file and won't delete directories.

What's really bad about rm -rf / is it doesn't delete everything on the drive because it will quit once it can no longer run rm itself so it is useless for getting rid of sensitive data before disposing of drives.

The experienced admin has however done something like the above on at least one occasion and it usually makes them learn to be rather careful when using commands like rm.


All times are GMT -5. The time now is 12:05 AM.