Red Hat ENTERPRISE LINUX 4 - STEP BY STEP GUIDE Manual page 48

Table of Contents

Advertisement

34
You might think of the file system as a tree and directories as branches. There would be no tree
without a root, and the same is true for the Red Hat Enterprise Linux file system. No matter how far
away the directories branch, everything is connected to the root directory, which is represented as a
singe forward slash (/).
Tip
Red Hat Enterprise 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 (
speaking to someone and using the term root, be sure to know which root is being discussed.
3.2.1. Paths
To continue the tree analogy from Section 3.2 A Larger Picture of the File System, imagine navigating
the file system as climbing around in the branches of the tree. The branches you would climb and
traverse in order to get from one part of the tree to another would be the path from one location to
another. There are two kinds of paths, depending on how you describe them. A relative path describes
the route starting from your current location in the tree. An absolute path describes the route to the
new location starting from the tree trunk (the root directory).
Graphic file browsers like Nautilus use an absolute path to display your location in the file system.
At the top of a Nautilus browser window is a location bar. This bar indicates your current location
starting with a forward slash (/) — this is an absolute path. You can navigate the file system by
entering the absolute path here. Press [Enter] and Nautilus moves immediately to the new location
without navigating through the intervening directories one at a time.
Navigating via the shell prompt utilizes either relative or absolute paths. In some instances, relative
paths are shorter to type than absolute paths. In others, the unambiguous absolute path is easier to
remember.
There are two special characters used with relative paths. These characters are "." and "..". A single
period, ".", is shorthand for "here". It references your current working directory. Two periods, "..",
indicates the directory one level up from your current working directory. If your current working
directory is your home directory,
Consider moving from the
between the two requires a great deal of typing, and requires knowledge of the absolute path to your
current working directory. The relative path would look like this: ../../../tmp/. The absolute
path is much shorter: /tmp/. The relative path requires you to move up three directories to the
directory before moving to the
/
directory, is much simpler.
However, the relative path between two closely-related directories may be simpler than
the
absolute
path.
) and the root directory for the entire file system (
/root
Figure 3-1. The Nautilus location bar
/home/user/
/usr/share/doc/
directory. The absolute path, which always starts at the
/tmp/
Consider
moving
Chapter 3. Managing Files and Directories
, ".." indicates the next directory up,
directory to the
/tmp/
from
/var/www/html/pics/vacation/
). When you are
/
.
/home/
directory. The relative path
/
to

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise linux 4

Table of Contents