tar -czvf MyArchive.tar.gz Source_file
tar –create –gzip –verbose –file=MyArchive.tar.gz Source_file

Above are two identic sample of creating a tar.gz file in Ubuntu terminal window. The options are explained here:

-c, –create : create a new archive

-z, –gzip : filter the archive through gzip

-v, –verbose : verbosely list files processed

-f, –file=ARCHIVE : use archive file or device ARCHIVE

 

Sumber : http://priyo.alumni.ipb.ac.id/2011/06/03/create-tar-gz-archive-from-ubuntu-terminal/