




















| |
Lab 19
(Chapter 19)
Learning Objectives
- To learn how files and
directories can be archived in UNIX
- To learn how to recover a
subset of archived files
- To learn how to copy
directories
Lab Work
- Log on to your UNIX system.
- Change directory to the
courses directory and archive it as courses.tar. What is the size of the
archive? Show your session.
- 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.
- What is the purpose of the
following session? Explain how the second command works?
$ cd ~/professional/courses
$ tar cvf - `find . –print` >
courses
- 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.
- 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.
- 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.
- Log out.
|