unpack an archive

Open any common archive: tar, zip, gz, xz, 7z, rar.

  • archives
  • files

Steps

  1. tar -xf archive.tar.gz

    any tar: .tar, .tar.gz, .tgz, .tar.xz, .tar.zst

  2. tar -xf archive.tar.gz -C /dest

    into another folder

  3. unzip archive.zip -d folder

    a zip, into a folder

  4. gunzip file.gz

    a single .gz file

  5. xz -d file.xz

    a single .xz file

  6. 7z x archive.7z

    7z, and most other kinds (p7zip)

  7. unrar x archive.rar

    rar, if unrar is installed

Notes

  • tar -tf and unzip -l list what is inside first.

Commands used

  • tar
  • unzip
  • 7z
  • gunzip

Each has a page in lore: lore tar opens it.