Unix / Linux Untar Process
Some Common extensions -
[filename].tgz
[filename].tar
[filename].tar.gz
[filename].tar.z
[filename].z
The following is an extraction method -
Upload .tgz, .tar .tar.gz or .tar.z to directory of the web server that is given for general purpose use, this should be uploaded in BINARY format by making use of any FTP program.
You can then connect to web server using terminal emulation program, one of the programs is SSH, you could enter your username and password, on the web server change the directory, if it named as WWW, then type the following command -
cd /var/www/html or /usr/domain/www or similar
Start from the root directory as (/).
With files that have the .tgz, tar.gz, or tar.z extension use this command:
tar -zxvf [filename with all extensions]
example: tar -zxvf file.tar.gz
Extracts the file in the directory, use the above command, this will save from redirecting the output fot gzip, if not then the command should be as follows -
>uncompress [filename with all extensions]
>gunzip [filename with all extensions]
>tar -xvf [filename with only tar extension]
The following are the ways to decompress files to use -
gunzip [filename with .gz extension] - f.e. gunzip file.gz
zcat [filename with .gz extension] - f.e. zcat file.gz
uncompress [filename with .z extension] - f.e. uncompress file.z
Set the appropriate permissions on the program as required after the extraction.
i e. By making Telnet/SSH you would 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
Make use of FTP client to change the attributes of files, 777 (RWX-RWX-RWX) and 755 (RWX-RX-RX) are the usually used attributes for files that relate and runn most CGI scripts on a server.
*Note: Permission error when exectuting tar !
In this case You have to chmod the .tar or .tar.gz file before tar will be able to extract the files.
i.e.:
chmod 755 file.tar.gz
tar -zxvf file.tar.gz
<!-- / message --><!-- controls -->
|