← All 010-160 Flashcard Decks

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
  1. What happens when you run `gzip` on a file that is already compressed (e.g., a .jpg)?

    Answer: It compresses it anyway, often resulting in a larger file

    gzip compresses any file regardless of type, but already-compressed formats like JPEG gain little and may even grow slightly.

  2. Which command extracts only a specific file from a tar archive?

    Answer: tar -xf archive.tar path/to/file.txt

    You can specify one or more filenames after the archive name with tar -xf to extract only those specific files.

  3. What is the purpose of `tar --listed-incremental=snapshot.file`?

    Answer: Create an incremental backup using a snapshot file to track changes

    This option enables incremental backups by recording file metadata in the snapshot file and only archiving changed files on subsequent runs.

  4. Which command shows compression statistics like compressed size, original size, and ratio for a .gz file?

    Answer: gzip -l file.gz

    The -l (list) option displays compression statistics including compressed size, uncompressed size, and compression ratio.

  5. What does `tar -uvf archive.tar newfile.txt` do?

    Answer: Appends newfile.txt only if it is newer than the version in the archive

    The -u (update) flag adds files to the archive only if they are newer than the existing archived version.

  6. Which decompression command is the correct counterpart to `xz`?

    Answer: Both unxz and xz -d work

    Both `unxz` (a symlink to xz) and `xz -d` decompress .xz files — they are functionally equivalent.

  7. What does the `cpio` command primarily do in Linux?

    Answer: Creates and extracts archives, often used with find for backup

    cpio is an archiving tool that copies files to and from archives and is commonly piped with find to create backups.