nerdexam
LPI

010-150 · Question #19

Which of the following commands can be used to extract content from a tar file?

The correct answer is A. tar -xvf. The tar command uses specific flags to control its operation mode. The -x flag is required to extract, while -v provides verbose output and -f specifies the archive filename.

The Power of the Command Line

Question

Which of the following commands can be used to extract content from a tar file?

Options

  • Atar -xvf
  • Btar -vf
  • Ctar -e
  • Dtar -c
  • Etar -v

How the community answered

(27 responses)
  • A
    81% (22)
  • B
    11% (3)
  • C
    4% (1)
  • E
    4% (1)

Why each option

The `tar` command uses specific flags to control its operation mode. The `-x` flag is required to extract, while `-v` provides verbose output and `-f` specifies the archive filename.

Atar -xvfCorrect

The flags `-xvf` combine extract (`-x`), verbose (`-v`), and file (`-f`) into a single option group, which is the standard and correct way to extract the contents of a tar archive while displaying progress.

Btar -vf

`tar -vf` omits the required `-x` (extract) operation flag, so tar has no instruction on what operation to perform and will error.

Ctar -e

`-e` is not a recognized standard tar option for extraction; it is not a valid operation flag.

Dtar -c

`-c` is the create flag, which builds a new archive rather than extracting an existing one.

Etar -v

`-v` alone only sets verbose mode and specifies no operation, making it insufficient to extract any content.

Concept tested: tar command flags for archive extraction

Source: https://www.gnu.org/software/tar/manual/tar.html#Operation-Summary

Topics

#tar#file extraction#archive#command line

Community Discussion

7
Carlos M.Carlos M.Mar 5, 2026

A is correct. The -x flag is what tells tar to extract, -v gives you verbose output so you can see what it's pulling out, and -f specifies the archive file to work with, so tar -xvf archive.tar is the standard command you'll use constantly on the job and on the exam.

23
Ingrid P.Ingrid P.Mar 7, 2026

The core is right, though worth adding a card for the order independence, since -xvf, -xfv, and even xvf without the leading hyphen all work in GNU tar, and exam distractors sometimes exploit that assumption.

0
Grace U.Grace U.Mar 20, 2026

I almost circled E because I kept thinking "verbose" sounded like it was doing the most work, but then I remembered that v just controls output, and the flag that actually pulls files out of the archive is x, which is what makes tar -xvf the right call.

3
Ingrid P.Ingrid P.Mar 29, 2026

tar -xvf is the one you want, and it is worth having a card for each flag individually: x for extract, v for verbose output, f for specifying the filename. The other options here are traps because -c creates an archive and -v alone just toggles verbosity with no action flag.

1
Carlos M.Carlos M.Mar 30, 2026

Solid breakdown, though I'd add that -z (gzip) and -j (bzip2) are worth memorizing too since a lot of real exam questions throw compressed archives at you and expect you to know whether to add that flag or not.

0
Ola B.Ola B.Apr 15, 2026

Spun this up in my home lab just last week and I kept going back to tar -e because that flag felt right for "extract," so C is the one I locked in on my answer sheet. Muscle memory from the sandbox, trust me, fire up a VM and run it yourself if you want to feel sure before test day.

0
Carlos M.Carlos M.Apr 18, 2026

Hey Ola, the extract flag for tar is -x, not -e, so the answer is A. Easy to mix up since -e does not do what the name implies, but -x is what the exam and real systems expect.

0
Full 010-150 Practice