tar, zip, gzip, bzip

Updated . Posted . Visible to the public.

Can't remember those switches for tar etc.? Show archive.org snapshot

Unzipping

tar

plain: tar -xvf archive_name.tar.gz
bz2: tar -jxvf archive_name.tar.bz2 -C /tmp/extract_here/
xz: tar -Jxvf archive_name.tar.xz
gz: tar -zxvf archive_name.tar.gz

zip

unzip archive_name.zip

Zipping

tar

plain tar -cvf archive_name.tar directory_to_compress
bz2: tar -jcvf archive_name.tar.bz2 directory_to_compress
xz: tar -Jcvf archive_name.tar.xz directory_to_compress
gz: tar -zcvf archive_name.tar.gz directory_to_compress

zip

zip -r archive_name.zip directory_to_compress

Markus
Last edit
Markus
Posted by Markus to Markus's deck (2015-04-21 10:45)