Recall & Review
beginner
What does the
-z option do in the tar command?The
-z option tells tar to compress or decompress the archive using gzip compression.Click to reveal answer
beginner
How do you create a bzip2 compressed tar archive named
archive.tar.bz2?Use
tar -cjf archive.tar.bz2 foldername. The -j option enables bzip2 compression.Click to reveal answer
intermediate
What compression does the
-J option use in tar?The
-J option uses xz compression, which often provides better compression than gzip or bzip2.Click to reveal answer
beginner
How to extract a gzip compressed tar archive named
backup.tar.gz?Use
tar -xzf backup.tar.gz. The -x extracts, -z decompresses gzip, and -f specifies the file.Click to reveal answer
intermediate
Why choose
-J (xz) compression over -z (gzip) or -j (bzip2)?Because xz usually compresses files smaller than gzip or bzip2, saving more space, but it may take longer to compress or decompress.
Click to reveal answer
Which
tar option compresses using gzip?✗ Incorrect
The
-z option uses gzip compression.What does the
-j option do in tar?✗ Incorrect
The
-j option tells tar to use bzip2 compression.How do you extract an xz compressed tar archive named
data.tar.xz?✗ Incorrect
The
-J option decompresses xz compressed archives.Which option is NOT used for compression in
tar?✗ Incorrect
The
-x option is for extraction, not compression.What command creates a gzip compressed archive named
files.tar.gz from folder docs?✗ Incorrect
Use
-c to create, -z for gzip compression, and -f to specify the file.Explain how to create and extract tar archives using gzip, bzip2, and xz compression options.
Think about the compression letter options and the basic tar commands for create and extract.
You got /6 concepts.
What are the differences between gzip, bzip2, and xz compression when used with tar?
Consider speed and compression quality differences.
You got /4 concepts.