How to Extract Tar Files in Linux

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

Steps

  1. Image titled Extract Tar Files in Linux Step 1
    1
    Open the terminal.
  2. Image titled Extract Tar Files in Linux Step 2
    2
    Type tar.
  3. Image titled Extract Tar Files in Linux Step 3
    3
    Type a space.
  4. Image titled Extract Tar Files in Linux Step 4
    4
    Type -x.
  5. Image titled Extract Tar Files in Linux Step 5
    5
    If the tar file is also compressed with gzip (.tar.gz or .tgz extension), type z.
  6. Image titled Extract Tar Files in Linux Step 6
    6
    Type f.
  7. Image titled Extract Tar Files in Linux Step 7
    7
    Type a space.
  8. Image titled Extract Tar Files in Linux Step 8
    8
    Type the name of the file that you wish to extract.
  9. Image titled Extract Tar Files in Linux Step 9
    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.

Article Info

Categories: Linux