Accessing Directories (Folders)

The final topic in our discussion of the basics of the JDS deals with accessing directories, which many people also call folders.

JDS runs on top of Linux and uses the conventions of the Linux Operating System. As with most operating systems, all files and directories are arranged in a hierarchy. Forward slashes are used to separate names as you go down the treelike hierarchy. Thus, the name /home/tom/documents means “the directory documents under the directory tom under the directory home.”

Unlike other systems, which provide a separate hierarchy for each disk drive (hard drive), Linux provides a single hierarchy that includes every drive and partition. We call the topmost directory of the directory tree the root directory, which is written as just a forward slash (/). All directories and files are below this root directory.

When you log in to Linux, the system places you in a special directory, known as your home directory. Each user has a distinct home directory, where the user creates personal files. This makes it simple for the user to find files previously created, because they are isolated from the files of other users.

Figure 2-21 shows a typical portion of a JDS file hierarchy. Notice the box called “home.” This box represents the area within the Linux directory structure in which a user’s home directory exists. So the home directory for user tom is /home/tom. If the user has a file in his Documents directory, in the subdirectory text, we can refer to it as /home/tom/Documents/text/filename.

Linux directory structure

Figure 2-21. Linux directory structure

Common Linux Directories

If you have to poke around the Linux directory structure to carry out some administrative task that was not done through dialog boxes, you may find the information in Table 2-1 helpful.

Table 2-1. Linux directories

Directory

Contents

bin

This directory contains most of the executable files of applications. The name is short for “binary,” which describes most executable files. An executable file in Linux does not necessarily have an extension by which you can identify it. In Nautilus, you can often find out what the file is by right-clicking on the file and selecting Properties.

boot

This directory contains the Linux kernel and the files used by the bootloader to start Linux.

dev

This directory contains files representing devices such as hard disks and floppies.

etc

This directory houses the configuration files for various applications and system daemons. Traditionally, to configure the applications or services in Linux, you had to manually edit these configuration files (usually plain text files).

home

This directory contains the home directories of the users. Note that the root (administrator) home directory does not exist within home. The root’s home directory is /root.

lib

This directory contains libraries used by numerous programs and applications.

mnt

This directory commonly contains the mount points. A mount point is the place where you can access other data devices such as CDs and floppies.

opt

This directory can be used by third-party applications (those that come from outside JDS) as their installation directory.

proc

This directory contains information about the Linux kernel and files and sometimes permits system administrators to dynamically change kernel behavior.

sbin

This directory is where JDS places applications or commands used by the system administrator.

tmp

This directory is used by applications for storing their temporary files.

usr

This directory is where most Linux applications usually get installed.

var

This directory is used for storing material headed for the printer, log files, cache files, etc.

Table 2-1 contains the names of the Linux directory tree. People new to Linux or Unix may find the naming conventions of the directory to be strange. If you do, please do not feel concerned; we have all struggled with these conventions.

Linux inherited the operating system concepts of Unix, and when the original Unix developers named things, they used abbreviations and acronyms. Over time, you may value having the directory information on the tip of your tongue. Until then, just having some recognition of the information in Table 2-1 can help you get around or recognize where you end up by accident. That may also help you find your way home.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.62.122