Archiving and Compression Flashcards
7 cards from real 010-160 practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Archiving and Compression flashcards as text
Which compression tool generally achieves the highest compression ratio among gzip, bzip2, and xz?
Answer: xz
xz typically achieves the best compression ratio of the three but is also the slowest to compress and decompress.
What does `tar -tf archive.tar` output?
Answer: A list of filenames stored in the archive
The -t flag lists the table of contents of a tar archive, showing each filename stored within it.
Which option makes `zip` compress files recursively including subdirectories?
Answer: -r
The -r option tells zip to recurse into directories and include all files and subdirectories in the archive.
What is the result of running `bzip2 -d file.txt.bz2`?
Answer: Decompresses to file.txt and removes file.txt.bz2
By default, bzip2 -d removes the compressed file and replaces it with the decompressed version.
Which command creates a tar archive without any compression?
Answer: tar -cf archive.tar files/
Using only -c and -f without -z, -j, or -J creates a plain uncompressed tar archive.
What does `zcat file.gz` do?
Answer: Displays the decompressed content of file.gz to stdout
zcat is equivalent to gunzip -c and outputs the uncompressed content to standard output without modifying the file.
Which flag tells tar to use xz compression when creating an archive?
Answer: -J
The uppercase -J flag selects xz compression, while lowercase -j selects bzip2 and -z selects gzip.