Prev | Current Page 208 | Next

Christopher Negus

"Linux Bible, 2008 Edition: Boot up to Ubuntu, Fedora, KNOPPIX, Debian, openSUSE, and 11 Other Distributions"


Files are organized within a hierarchy of directories. Each directory can contain files, as well as
other directories.
If you were to map out the files and directories in Linux, it would look like an upside-down tree.
At the top is the root directory, which is represented by a single slash (/). Below that is a set of
common directories in the Linux system, such as bin, dev, home, lib, and tmp, to name a few.
Each of those directories, as well as directories added to the root, can contain subdirectories.
Figure 2-1 illustrates how the Linux file system is organized as a hierarchy. To demonstrate how
directories are connected, the figure shows a /home directory that contains subdirectories for three
users: chris, mary, and tom. Within the chris directory are subdirectories: briefs, memos, and
CAUTION
65
Running Commands from the Shell 2
personal. To refer to a file called inventory in the chris/memos directory, you can type the
full path of /home/chris/memos/inventory. If your current directory is /home/chris/memos,
you can refer to the file as simply inventory.
FIGURE 2-1
The Linux file system is organized as a hierarchy of directories.
Some of the Linux directories that may interest you include the following:
 /bin??”Contains common Linux user commands, such as ls, sort, date, and chmod.


Pages:
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220