Chapter 12. Managing Files and Directories

The GNOME file manager Nautilus and the KDE file manager Konqueror are powerful and important tools for managing files and directories. They are discussed in Chapter 2 and Chapter 3, respectively. This chapter discusses the shell prompt commands that can be used to manage files and directories on your Red Hat Linux system as well as how to view PDF files.

NoteNote
 

Due to system security, unless you are root, you will not be able to gain access to all system-level files and directories. If you do not have the permission to open, delete, or execute a file, you will receive an error message saying your access is denied. This is normal behavior.

A Larger Picture of the File System

Every operating system has a method of storing data in files and directories so that it can keep track of additions, modifications, and other changes.

In Linux, every file is stored in a directory. Directories can also contain directories; these subdirectories can also contain files and other subdirectories.

You might think of the file system as a tree-like structure, in which directories "branch off." Those directories may contain, or be the "parent" of, other directories which may hold files and directories of their own.

There would not be a tree without a root, and the same is true for the Linux file system. No matter how far away the directories branch, everything is connected to the root directory, which is represented as a single forward slash (/).

TipTip
 

Red Hat Linux uses the term root in several different ways, which might be confusing to new users. There is the root account (the superuser, who has permission to do anything), the root account's home directory (/root) and the root directory for the entire file system (/). When you are speaking to someone and using the term root, be sure you know which root you are talking about.

Unless you are a system administrator, you probably do not have permission to write to the files and directories outside of your home directory. Certain directories are reserved for specific purposes. For example, /home is the default location for users' home directories.

Users that are not system administrators might find the following directories useful:

Your Red Hat Linux system is compatible with many other Linux distributions because of the Filesystem Hierarchy Standard (FHS). The FHS guidelines help to standardize the way system programs and files are stored on all Linux systems.

To learn more about the FHS, refer to the Official Red Hat Linux Reference Guide Reference Guide. You can also visit the FHS website: http://www.pathname.com/fhs.