Skip to content

Instantly share code, notes, and snippets.

@yufengwng
Created March 26, 2015 02:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yufengwng/4fee99e4d53845be6f0f to your computer and use it in GitHub Desktop.
Save yufengwng/4fee99e4d53845be6f0f to your computer and use it in GitHub Desktop.
Commands for archiving and zipping files.
tar
===
create new gunzipped tar
$ tar cvzf <name>.tar.gz file <files>
extract from gunzipped tar
$ tar xvzf <name>.tar.gz
list contents of gunzipped tar
$ tar tf <name>.tar.gz
zip
===
create new zip
$ zip <name>.zip file <files>
extract from zip
$ unzip <name>.zip
list contents of zip
$ unzip -l <name>.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment