 |
|
Compressing and
uncompressing directory contents
Oracle Tips by Burleson Consulting |
When the contents of a directory are seldom used, it may be
prudent to compress that directory’s contents to conserve disk
space.
If you are planning to send the contents of a directory to
another media, another server via a network connection, or
maybe to another user via an e-mail attachment, it would also
be prudent to compress the directory contents to save
transmission time. The following examples show an easy
method of compressing a directory into a tar archive file and
also uncompressing the archive into its’ original structure.
directory:~
$ tar cvf examples.tar examples create examples.tar archive
examples/
examples/declaration.txt
examples/gettysburg.txt
examples/preamble.txt
Directory:~
$
Directory:/tmp
$ tar xvf examples.tar extract from examples.tar archive
examples/
examples/declaration.txt
examples/gettysburg.txt
examples/preamble.txt
The above book excerpt is from:
Easy Linux
Commands
Working Examples of Linux Command Syntax
ISBN:
0-9759135-0-6
Terry Clark