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
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