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 tar option extracts files to a specific directory instead of the current one?
Answer: -C /path/to/dir
The -C option changes the working directory before performing any operations, so files are extracted there.
What does the `gzip -k` flag do?
Answer: Keep the original file after compression
The -k (keep) flag tells gzip to retain the original file instead of replacing it with the compressed version.
Which command lists the contents of a .tar.bz2 file without extracting it?
Answer: tar -tjf archive.tar.bz2
The -t flag lists contents, -j specifies bzip2, and -f specifies the filename — no extraction occurs.
What compression format does the `xz` command produce by default?
Answer: .xz using LZMA2
The xz utility uses the LZMA2 algorithm and produces files with the .xz extension by default.
Which tar option appends files to an existing uncompressed tar archive?
Answer: -r
The -r (append) option adds files to the end of an existing archive without recreating it.
What is the purpose of `tar --exclude='*.log'` when creating an archive?
Answer: Skip all files matching the pattern *.log
The --exclude option tells tar to skip any files matching the given pattern during archive creation.
Which command decompresses a .xz file while keeping the original compressed file?
Answer: xz -dk file.xz
The -d decompresses and -k keeps the original, so both the compressed and decompressed files remain.
Written and edited by Nathan Beja, founder of Practice Test Geeks, with AI assistance. Exam facts are checked against the official sources linked below. Editorial policy
Sources & references
Exam facts on this page (fees, format, dates, passing scores) are checked against these official sources; the date is our last check. Editorial policy
- lpi.org — Test delivery, eligibility, exam format, score validity, passing score, score release, fees · verified Dec 2026
- pearsonvue.com — Time limit · verified Nov 2026