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
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
|
![]() |
|
| <Send This Link to a Friend> <Help> <Bookmark This Page> | ||