232 You Are Here
A little later in this chapter, when we introduce you to pipes and I/O redirection,you’ll discover that
there are other ways to view the contents of a directory.
Summary: To see the contents of a directory, type ls at a shell prompt; typing ls -a
will display all the contents of a directory; typing ls -a --color will display all the
contents categorized by color.
16.4 A Larger Picture of the Filesystem
Every operating system has a method of storing its files and directories so that it can keep track of
additions, modifications and other changes.
In Linux, every file is stored on the system with a unique name, in directories which can also hold
other files and directories – or, subdirectories.
You might think of the system as a tree-like structure, in which directories “branch off.” Those direc-
tories may contain – or be the “parent” of – other directories which may hold files or directories of
their own.
There wouldn’t be a tree without a root, and the same is true for the Linux filesystem. No matter how
far away the branches, everything is connected to the root, which is represented as a single forward
slash (/).
It might seem confusing to have several references to “root” - the root account, the root account’s
login directory and the root directory (/), but think of it this way: The root login, who is the system
administrator, is just as important to keeping things together in the system as the system’s root (/).
Tip: Even though there are other Linux distributions, your Red Hat Linux system is
likely to be compatible with them. The reason is because of the Filesystem Hierarchy
Standard (also known as FHS). These guidelines help to standardize the way system
programs and files are stored on all Linux systems. You can read more about the FHS at
its website:
http://www.pathname.com/fhs/
As long as we’re logged into our user account – which will help prevent disastrous mistakes – let’s
take a look around.
The first stop on this tour ought to be the root directory, which will give us a larger picture of where
things are.
At the shell prompt, then, let’stype:
Comments to this Manuals