This is a note about how to tar and un-tar files. It serves as a memo as I always forget these commands and have to look them up.
Create a simple tar file:
tar -cvvf archive.tar folder_to_archive/
Extract a tar file:
tar -xf archive.tar
Bzip2 compress folder and it's sub folders, files:
tar -c --bzip2 -f archive.bz2 folder_to_archive/
Bzip2 extract:
tar -jxvf archive.bz2
Gzip compress folder and it's sub folders, files:
tar -cvzpf archive.tar.gz folder_to_archive/
Gzip extract:
tar -zxvf archive.tar.gz
Extract Gzip SQL:
gunzip archive.sql.gz
Comments
Post new comment