Home > Articles

  • Print
  • + Share This
This chapter is from the book

Exam Preparation Tasks

As mentioned in the section “How to Use This Book” in the Introduction, you have a couple of choices for exam preparation: the exercises here, Chapter 21, “Final Preparation,” and the practice exams on the DVD.

Review All Key Topics

Review the most important topics in this chapter, noted with the Key Topics icon in the outer margin of the page. Table 5-3 lists a reference of these key topics and the page numbers on which each is found.

Table 5-3 Key Topics for Chapter 5

Key Topic Element


Page Number


FHS documentation about what goes on the root volume



The use of the /usr and /usr/local/ directories



Relative pathnames and . (period character)



Long listing format ( -l ) to see permissions



Using the touch command



Using a glob to avoid copying into a directory incorrectly



Locate needs the database refreshed periodically



Locate searches whole names



Examples of find usage



When to use whereis versus locate



The filename is not stored in the inode



Symlinks consume inodes



The order and function of tar’s options



Creating a tar archive



bzip2 has the highest compression rate



The -v option to tar



cpio accepts its files from the standard input


Define Key Terms

Define the following key terms from this chapter and check your answers in the glossary:

  • File System Hierarchy Standard
  • relative path
  • absolute path
  • hard link

Review Questions

The answers to these review questions are in Appendix A.

  1. You are installing a customized server and need to strip the root filesystem down to the essentials only. According to the FHS 2.3, which of the following are considered optional on the root (/) filesystem? (Choose two.)

    1. /root
    2. /usr
    3. /tmp
    4. /home
  2. One of your programmers has produced an order entry system that will be shared among your users from a central file server. What is the appropriate directory to place this program and its associated files in?

    1. /usr/local/bin
    2. /usr/local
    3. /usr/share
    4. /opt
  3. Which of the following is a true statement about files on a default Linux system? (Choose all that apply.)

    1. Filenames can start with a number.
    2. Filenames can contain multiple periods.
    3. Filenames can contain spaces.
    4. Filenames can contain ampersands.
    5. Filenames can contain backslashes.
  4. You find a string in a shell script that contains the following command:

    cp /data/*.doc ~tarfoo

    What is the meaning of the characters ~tarfoo?

    1. A special function named tarfoo
    2. A directory named tarfoo in your home directory
    3. The tarfoo user’s home directory
    4. The /data/tarfoo directory
  5. You are currently in the directory /home1/user1/subdir1 and need to navigate to the directory /home12/user3. Which of the following commands will accomplish this?

    1. cd home12/user3
    2. cd ~/user3
    3. cd ../../home12/user3
    4. cd ../../../home12/user3
  6. You have a directory named /dir1 that contains subdirectories and regular files. You want to replicate this directory structure exactly into an existing directory named /dir2. Which of the following commands accomplish this? (Choose all that apply.)

    1. cp –-contents dir1/ /dir2
    2. cp –r /dir1/* /dir2
    3. xcopy /dir1 /dir2
    4. cp –r /dir1 /dir2
  7. You are currently in the /bbb directory and want to move the contents from the /ccc directory to this one. What is the shortest command that will accomplish this?

    1. mv /ccc/*.* .
    2. mv ../ccc/*.* .
    3. mv /ccc/* .
    4. mv /ccc/ /bbb
  8. Which option to the mkdir and rmdir commands allows you to create a nested subdirectory tree?


    1. -c
    2. -n
    3. -d
    4. -p
  9. You are the sysadmin of a busy server and need to save space on your /home partition. You need to remove all files named core that are older than seven days in the users’ home directories, without receiving any prompts.

    1. find /home –mtime +7 –name core –exec rm –f {} \;
    2. find ~ -mtime +7 -name core -exec rm -f {} \;
    3. find /home -mtime -7 -name core -exec rm -f {} \;
    4. find /home -older 7d -name core -exec rm -f {} \;
  10. Which of the following situations would prevent you from creating a hard link?

    1. The link spans filesystems.
    2. The source of the link is a hidden file.
    3. The source of the link is a device file.
    4. The source of the link is a directory.
    5. The destination contains special characters.
  11. How would you back up Rebecca’s home directory using the best compression available?

    1. cd /home; tar -czf rebecca.tgz rebecca
    2. find ~rebecca | tar -cjf - > rebecca.tar.bz2
    3. tar -cjf rebecca.tar.bz2 ~rebecca
    4. tar -xjf rebecca.tar.bz2 ~rebecca
  • + Share This
  • 🔖 Save To Your Account