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
What does `tar -cvzf backup.tar.gz /home/user` do?
Answer: Creates a gzip-compressed archive of /home/user with verbose output
Flags -c (create), -v (verbose), -z (gzip), -f (filename) together create a compressed tar archive.
Which utility can both compress files and create archives (unlike gzip which only compresses)?
Answer: zip
The zip utility creates archive files containing multiple files with compression, while gzip/bzip2/xz only compress single files.
What does `gunzip -c file.gz` do?
Answer: Decompresses to stdout without modifying the original file
The -c flag writes decompressed output to standard output (stdout), leaving the original .gz file intact.
Which command tests the integrity of a gzip-compressed file without decompressing it?
Answer: gzip -t file.gz
The -t option tests the compressed file's integrity by verifying checksums without writing any output files.
What extension does `bzip2` add to a compressed file by default?
Answer: .bz2
By default, bzip2 appends .bz2 to the original filename, so file.txt becomes file.txt.bz2.
Which tar flag preserves file permissions and ownership during extraction?
Answer: -p
The -p (preserve permissions) flag instructs tar to restore the original permissions of extracted files.
What does `unzip -l archive.zip` do?
Answer: Lists the contents of archive.zip without extracting
The -l option displays the file listing inside the zip archive including sizes and dates, without extracting anything.