Workshop

The Workshop summarizes the key terms you learned and poses some questions about the topics presented in this chapter. It also provides you with a preview of what you will learn in the next hour.

Key Terms

absolute filename Any filename that begins with a leading slash (/); these always uniquely describe a single file in the file system.

binary A file format that is intended for the computer to work with directly rather than for humans to peruse. See also executable.

device2 driver All peripherals attached to the computer are called devices in UNIX, and each has a control program always associated with it, called a device driver. Examples are the device drivers for the display, keyboard, mouse, and all hard disks.

directory A type of UNIX file used to group other files. Files and directories can be placed inside other directories, to build a hierarchical system.

directory separator character On a hierarchical file system, there must be some way to specify which items are directories and which is the actual filename itself. This becomes particularly true when you're working with absolute filenames. In UNIX, the directory separator character is the slash (/), so a filename like /tmp/testme is easily interpreted as a file called testme in a directory called tmp.

dot A shorthand notation for the current directory.

dot dot A shorthand notation for the directory one level higher up in the hierarchical file system from the current location.

dot file A configuration file used by one or more programs. These files are called dot files because the first letter of the filename is a dot, as in .profile or .login. Because they're dot files, the ls command doesn't list them by default, making them also hidden files in UNIX. See also hidden file.

dynamic linking Although most UNIX systems require all necessary utilities and library routines (such as the routines for reading information from the keyboard and displaying it to the screen) to be plugged into a program when it's built (known in UNIX parlance as static linking), some of the more sophisticated systems can delay this inclusion until you actually need to run the program. In this case, the utilities and libraries are linked when you start the program, and this is called dynamic linking.

executable A file that has been set up so that UNIX can run it as a program. This is also shorthand for a binary file. You also sometimes see the phrase binary executable, which is the same thing! See also binary.

hidden file By default, the UNIX file-listing command ls shows only files whose first letter isn't a dot (that is, those files that aren't dot files). All dot files, therefore, are hidden files, and you can safely ignore them without any problems. Later, you learn how to view these hidden files. See also dot file.

home directory This is your private directory, and is also where you start out when you log in to the system.

kernel The underlying core of the UNIX operating system itself. This is akin to the concrete foundation under a modern skyscraper.

preference file These are what dot files (hidden files) really are: they contain your individual preferences for many of the UNIX commands you use.

relative filename Any filename that does not begin with a slash (/) is a filename whose exact meaning depends on where you are in the file system. For example, the file test might exist in both your home directory and in the root directory: /test is an absolute filename and leaves no question which version is being used, but test could refer to either copy, depending on your current directory.

root directory The directory at the very top of the file system hierarchy, also known as slash.

search path A list of directories used to find a command. When a user enters a command ls, the shell looks in each directory in the search path to find a file ls, either until it is found or the list is exhausted.

slash The root directory.

symbolic link A file that contains a pointer to another file rather than contents of its own. This can also be a directory that points to another directory rather than having files of its own. A useful way to have multiple names for a single program or allow multiple people to share a single copy of a file.

user environment A set of values that describe the user's current location and modify the behavior of commands.

working directory The directory where the user is working.

Exercises

1:Can you think of information you work with daily that's organized in a hierarchical fashion? Is a public library organized hierarchically?
2:Which of the following files are hidden files and directories according to UNIX?
.test   hide-me   ,test   .cshrc
../     .dot.     dot     .HiMom

3:What programs most likely created the following dot files and dot directories?
.cshrc    .rnsoft     .exrc      .print
.tmp334   .excel/     .letter    .vi-expert

4:In the following list, circle the items that are absolute filenames:
/Personnel/Taylor,D.
/home/taylor/business/California

../..
Recipe:Gazpacho

5:Using the list of directories found on all UNIX systems (/bin, /dev, /etc, /lib, /lost+found, /mnt, /sys, /tmp, /usr), use cd and pwd to double check that they are all present on your own UNIX machine.

Preview of the Next Hour

In the next hour, you learn about the ls command that you've been using, including a further discussion of command flags. The command touch enables you to create your own files, and du and df help you learn how much disk space is used and how much is available, respectively. You also learn how to use two valuable if somewhat esoteric UNIX commands, compress and crypt, which help you minimize your disk-space usage and ensure absolute security for special files.

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

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