Extract Tar Files in Linux

Extract files from TAR archives with and without compression (GZip).

Steps

  1. Open the terminal.
  2. Type tar.
  3. Type a space.
  4. Type -x.
  5. If the tar file is also compressed with gzip (.tar.gz or .tgz extension), type z.
  6. Type f.
  7. Type a space.
  8. Type the name of the file that you wish to extract.
  9. Press enter.



Tips

  • For verbose output (look it up), add v to the list of options.

Warnings

  • Extracting an archive may overwrite files in some locations if the archive has a file of the same name.

Related Articles

Sources and Citations