Nine Deadly Keystrokes: how to wipe out the entire file system without really trying

I got this powerful information while reading Doctor Bob’s Lowfat Linux.

Don’t try this at home. LOL!

Given what you know now about the rm command and the structure of the Linux file system, perhaps you can see that the command

rm -rf /

would be something to avoid at all costs if you were logged in as root. But don’t let this scare you¾it’s just a reminder to be careful when deleting files.

You can avoid nasty surprises like this by running the pwd and ls commands before you delete anything. (Use ls on the same file or directory that you’re going to delete.) Then you’ll always be sure what directory you’re in and what files are about to be deleted.

And in general, it’s a good idea to log in as root only when you’re performing system administration tasks such as adding new users or installing software. Create another account and use it for all your normal everyday Linux tasks.

Source: http://lowfatlinux.com/linux-meltdown.html


About this entry