Lab 19

Back Up Next

horizontal rule

Home
Lab 1
Lab 2
Lab 3
Lab 4
Lab 5
Lab 6
Lab 7
Lab 8
Lab 9
Lab 10
Lab 11
Lab 12
Lab 13
Lab 14
Lab 15
Lab 16
Lab 17
Lab 18
Lab 19
Lab 20

Lab 19

(Chapter 19)

 

 


 

Learning Objectives

  1. To learn how files and directories can be archived in UNIX
  2. To learn how to recover a subset of archived files
  3. To learn how to copy directories

Lab Work

For this lab, we will use the file system structure under your home directory that you created while completing Lab 7. We are reproducing the same structure here for your reference.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


     

  1. Log on to your UNIX system.
  2. Change directory to the courses directory and archive it as courses.tar. What is the size of the archive? Show your session.
  3. Assume that your archive contains a file, Lab19.doc. Display the long listing of this file. What are the user and group IDs (or names) of the user who created the archive? Show your session.
  4. What is the purpose of the following session? Explain how the second command works?

$ cd ~/professional/courses

$ tar cvf - `find . –print` > courses

  1. Create the backups/courses directory under ~/professional and restore in it the backup of the courses directory that you created in 2 above. Show your session.
  2. Assume that ~/professional/backups/courses directory exists. Use the tar command and copy the directory hierarchy ~/professional/courses under the ~/professional/backups/courses directory. Use only one command line. Show your session.
  3. You have downloaded the compressed version of the Lab Workbook for UNIX: The Textbook, 2e into your ~/professional/courses/major/cs381/labs/workbook directory. The name of the file is unix2e.tar.gz. Use the tar command to decompress and restore it in the same directory. Show your session.
  4. Log out.

 

 

horizontal rule

Back to CS140U Homepage
This page was last modified September 26, 2004
wmorales@pcc.edu