Single command line to tar and gzip

Although there are several ways to achieve this, the way I most often tar and gzip files using a single command line is as follows:

tar cvf - myfile | gzip -9 > myfile.tar.Z

Leave a Reply

Your email address will not be published. Required fields are marked *