At the beginning of this section, I promised to reveal the Nine Deadly Keystrokes that could wipe out your entire file system. 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.
Previous Lesson: Linux Files - Wildcards
Next Lesson: Linux File Permissions
Popular Linux Topics
Linux IntroLinux Tutorial
Who is Doctor Bob?Linux Basics
Living in a ShellLinux Files
The Linux File SystemLinux Commands
Important Linux CommandsLinux Editors
The Vi EditorLinux Data Manipulation
Slicing & DicingLinux Shell Programming
Linux Shell ScriptsPerl Programming
Perl BasicsLinux and Email
Sending EmailCompression and Encoding
Linux File CompressionLinux Does DOS
Accesing DOS FilesManaging Linux
Updating Your Linux System