TAR and GUNZIP Compression:

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

Bash Scripting: First try

This morning, I started playing with Bash shell scripting, since I’ve been a unix admin for over two years. It might be about that time. So here is the first one I tried out:

#!/bin/bash
echo “Hello World!”

One of your more complicated scripts, but you get the right idea.