Monthly Archives: April 2009

tar and gzip

tar and gzip… So you want to tar and then compress with gzip?  tar and gzip in one step… Here is how you do it, please check out the tar and gzip man pages: (this is how I tar and gzip my files, I am not responsible for anything that happens on your machine)

# EXAMPLE CODE TEMPLATE (the dash is a double dash, not single)
tar –verbose –create –gzip –file <filename>.tar.gz <from-filename>

# EXAMPLE CODE (the dash is a double dash, not single)
tar –verbose –create –gzip –file textfile.tar.gz textfile.txt

# EXAMPLE CODE (run and “ls -l” and you should see the following files)
ls -l
textfile.txt
textfile.tar.gz