Managing Disk Space   «Prev  Next»

Archive Listing - Exercise

Course Project - Listing an Archive

Objective: Archive a directory tree and compress the archive.

Exercise Scoring

You will receive 2 points for this exercise.


As you work on the eCyberCom intranet site, you will want to make periodic backups of the site. To make a backup, you will archive the web site directory to create a tar file. Then you will compress the tar file to reduce its size. Note that many of the files in your project directory tree are empty because they are merely “dummy” files. However, the steps you will be following in this exercise are the same for all files, regardless of their size. Also, in a real-life situation, you would move the compressed file to a backup location, probably on another computer.


  1. Log in to your course account.
  2. Type the script command to begin recording your UNIX session in a file named ex200-6: % script ex200-6
  3. From your home directory, create a tar file of your project directory.
  4. List your current directory to observe that a tar file has been created.
  5. Use tar with the t option to verify the files in the archive.
  6. Compress the tar file.
  7. List your current directory to observe that the tar file was renamed with a .Z extension.
  8. Type exit to end the script command.
  9. Log out when you are done.


If you enter the logout command, but it responds “Not login shell,” it means you forgot to end the script command. Type exit and then logout.

Submitting your exercise

This exercise is auto-scored. When you have finished, just click the Submit button to receive full credit.