Skip to content

Instantly share code, notes, and snippets.

@markhowellsmead
Created June 16, 2014 08:19
Show Gist options
  • Save markhowellsmead/19a8c9ed28733faf37bf to your computer and use it in GitHub Desktop.
Save markhowellsmead/19a8c9ed28733faf37bf to your computer and use it in GitHub Desktop.
Unpack files via command line (including via SSH connections)
# Unpack files via command line (including via SSH connections)
# www.mhm.li | m@mhm.li | 6/2014 | Free use, no credit required
If a file ends in .zip (for example, file.zip), type:
unzip file.zip
If a file ends in .tar (e.g., file.tar), type:
tar -xvf file.tar
If a file ends in .gz (for example, file.gz), type:
gzip -d file.gz
If a file ends in .tar.gz (e.g. file.tar.gz), type:
gzip -d file.tar.gz
and then
tar -xvf file.tar
If a file ends in .tgz (e.g. file.tgz), type:
tar -xvzf file.tgz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment