How to tar and gzip a directory in one command?

December 4, 2010 in Recipes, Shell

This way (for the directory foo): tar -zcvf foo.tgz foo/