DispersedNet
SiteMap
Unix Concepts
Shell Programming
Shell Scripting
Unix Questions
Managing Disk Space
«Prev
Next»
Unix Concepts
File Management
List Files Command
Copy Directories Command
Removing Directories Quickly
Unix About Links
Creating File Link
Find Command Search
File Management Conclusion
Unix Customization
Creating Aliases Unix
list current Aliases
Displaying Previous Commands
Repeating Previous Commands
Modifying Previous Command
Changing System Prompt
Storing shell Settings
Customize-environment
Grep Regular Expression
Define Regex
Using Quotes with Regex
Matching Pattern Occurrences
Matching Pattern Position
Turnoff Character Meaning
Regex Conclusion
Pattern Matching - Quiz
editing with vi
vi Review
Text in vi
Creating Text
Creating Command Shortcuts
Configure Editing Environment
Storing Custom Settings
Esditing Multiple Files
Pasting Text Files
vi Editing Conclusion
Managing Disk Space
Unix 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.
Background/overview
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.
Instructions
Log in to your course account.
Type the
script
command to begin recording your UNIX session in a file named
ex200-6
:
% script ex200-6
From your home directory, create a tar file of your
project
directory.
List your current directory to observe that a tar file has been created.
Use
tar
with the
t
option to verify the files in the archive.
Compress the tar file.
List your current directory to observe that the tar file was renamed with a
.Z
extension.
Type
exit
to end the
script
command.
Log out when you are done.
Hints
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.