How to Zip/Unzip Tar/Untar any zip/tar/tar.gz

[b]Get help from the terminal[/b]
‘zip’ or ‘unzip’
tar –help
(see above)
(see above)
[b]
List the file’s contents[/b]
unzip -l file.zip
tar -tvf file.tar
tar -ztvf file.tar.gz
tar -ztvf file.tgz

[b]Extract the file’s contents[/b]
unzip -aq file.zip
tar -xf file.tar
tar -zxf file.tar.gz
tar -zxf file.tgz

[b]Create a zip/tar file[/b]
zip -9rq file.zip dir/
tar -cf file.tar dir/
tar -zcf file.tar.gz dir/
tar -zcf

Advertisements

One thought on “How to Zip/Unzip Tar/Untar any zip/tar/tar.gz

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s