This is how you would tar and gunzip a directory:
“www.tgz” is what you want the compressed file to be called
“/usr/local/www/” is the path to the directory you want to compress (www).
“tar -czf www.tgz /usr/local/www/ ” This will compress the desired directory into a file, which will be placed into the directory from where you run the command.
To decompress this file, back to it’s original directory, you would use “gunzip www.tgz“, then “tar -xvf www.tar.”
You may get an error that says something like “tar: Removing leading ‘/’ from member names”, which I think means that instead of creating directories like “/usr” “/local” “/www”, it will, instead, create “usr” “local” “www”.