[Intro Music]
We have just discussed how to use
such powerful search utility as
'find', and I have demonstrated to you
how you could easily and fast find
the necessary files and folders.
Now let me explain to you how to use
the archive, and the compress
utilities like tar and gzip. Let's
first have a look at the help for
such command as 'tar'. Type 'tar', and
here will be '--help', and
you'll find a bunch of different
options that this command has. And
if I scroll to the beginning of
this output, I'll see that this 'tar'
utility 'saves many files together
into a single tape or disk archive,
and can restore individual files
from the archive'. It means that the
main purpose of this 'tar' utility is to
create archive. An archive is
simply a set of files and folders
located in a single file. And
such archives have usually
extension 'tar', '.tar'. And this
utility has a lot of different
options like, 'c' - create new archive,
't' - list the contents of the archive,
'update', 'extract', and so on. There
are many many different options,
but of course you don't need to
memorize all of them. Most common
operations with the 'tar' utility
are creation of the archive and
extractions of the files from the
archive. Also, using such option as 't'
you are able to list the contents
of the archive. But please notice
that by default with just 'c' option,
for example, you will not create
compressed archive, you will simply
create a tar file that will contain
other files and folders. And if you
want to additionally compress this
archive, you could either use
additional option with tar file
that is '-z' option, or you could
use another utility gzip. Let me
show you help for this utility
'gzip --help'. And if you'll
scroll up, you'll find information
about this utility. It compresses
or uncompresses file or files. And
you could create the archive using
'tar' command, and afterwards compress
that archive using 'gzip'
utility; or you could use simply
'-z' option inside of the
'tar' utility, that will create the
compressed archive automatically.
And please note that such
compressed archives will have
following format, 'archive.tar.gz'.
And that means that
first archive is created with
extension '.tar'; and afterwards
this archive is compressed using
'gzip' utility; and additional
extension '.gz' is added. And
that is the most common format of
archives in Linux. And usually when
you download some files, Linux
files from internet, you download
them in compressed archived format.
And you'll see exactly such
extension as '.tar.gz'. And of course
using 'tar' utility you could easily
uncompress and extract files from
such archives. Alright, that is a
short description of those two utilities.
There are of course other
compressed utilities like 'zip' that
is very popular in Windows systems.
But 'gzip' is most popular choice
for Linux like systems. That's why
most common extension that you will
see is '.tar.gz'. Alright, next let's
dive a bit into practice, and let's
create some archives, and compress
them. I'll see you in the next
lecture. Bye.
[no audio]