For years I have been doing this:
$ tar -cf nameOfTarFileToBeCreated directoryToBeTarred
$ gzip nameOfTarFileToBeCreated
This results in a gzip archive named nameOfTarFileToBeCreated.gz.
Last week I found a command to do it one step:
$ tar -cz directoryToBeTarGzipped > nameOfTarGzipArchiveToCreate
e.g.
$ tar -cz kgreenwell > kgreenwell.tar.gz
instead of:
$ tar -cf kgreenwell.tar kgreenwell
$ gzip kgreenwell.tar
Especially handy if the tar operation is going to take a while.
Leave a Reply