Sunday, June 05, 2005

Untar a Unix / Linux file

This post define how to untar a Unix/Linux file for those that don't know. (Refering to me)
Supported Type;

With files that have the .tgz, tar.gz, or tar.z extension use this command:

tar -zxvf [filename with all extensions]

example: tar -zxvf yourfile.tar.gz

This will extract the file for you in the directory you are currently in. Using the above command will save you from having to redirect the output for gzip or anything else (because the z option automatically decompresses the file for you), otherwise without the z argument, you would have to do a command like this:

uncompress [filename with all extensions]

tar -xvf [filename with only tar extension]

Other ways to decompress files are to use:

gunzip [filename with .gz extension] - f.e. gunzip yourfile.gz

zcat [filename with .gz extension] - f.e. zcat yourfile.gz

uncompress [filename with .z extension] - f.e. uncompress yourfile.z

Not all Unix systems extract archive files with all the necessary permissions intact, therefore you should set the proper permissions on the program as required.

Using Telnet type the following at the prompt:

chmod -R 777 "directoryname"
cd "directoryname"
chmod 755 cgi-bin
cd cgi-bin
chmod 755 *.cgi
chmod 755 *.pl

You can also use most FTP clients to change the file attributes. 777 (RWX-RWX-RWX) and 755 (RWX-RX-RX) are the most widely used attributes for files relating to running most CGI scripts on a server.

Your Ad Here