0% found this document useful (0 votes)
13 views1 page

Compressing File Archives

The document provides instructions on how to manage file archives using the tar command in Bash and Z Shell. It explains the usage of options such as c for creating an archive, x for extracting files, and t for listing files within an archive. Additionally, it mentions how to compress archives using gzip and bzip2 with the respective z and j options.

Uploaded by

akym
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views1 page

Compressing File Archives

The document provides instructions on how to manage file archives using the tar command in Bash and Z Shell. It explains the usage of options such as c for creating an archive, x for extracting files, and t for listing files within an archive. Additionally, it mentions how to compress archives using gzip and bzip2 with the respective z and j options.

Uploaded by

akym
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

"Managing Files Using Bash and Z Shell" course by Mateo Prigl at Pluralsight

Compressing File Archives


We can archive files with the tar command. This will put all of the files into one
archive file. Usually this file would end with .tar.
$ tar cvf archive.tar file1 file2

This command will create an archive archive.tar and put the file1 and file2 inside
of it. c option creates the archive. v option is describing what is happening, in
this case it lists the files that need to be archived. It is not really useful in this
situation, but imagine if you are archiving a lot of file which follow some
specific pattern.
Then you would like to know which exact files are being compressed. f option
is there so we can provide the name of the archive.
Put x instead of c and you will extract files from the archive. t option will list the
files inside of an archive.
These archives can also be compressed with gzip or bzip2. To operate on them
with gzip always add the z option. This option needs to be added when you
want to list gzip archives and also when you want to extract files from it.
Same goes for the bzip2 with the j option.

1/1 © Copyright 2020 by Pluralsight

You might also like