|
Zip and Unzip to i5/OS PASE and QShell Environments |
|
|
|
Written by Admin (Chamara)
|
|
Zip and Unzip to i5/OS PASE and QShell Environments
From RedBook Abstracts (Modified download locations)
Here are the steps to add the Unzip and Zip functions to your System i server:
- Get the files from :
RPFIV.INFO site (you must be registered to download) You can Register by Clicking this
In our case, we download these files: which all are in ZipFiles.zip file
zip23x-aix43.zip To compress (zip) files
unz550x-aix5L.tar.gz To uncompress (unzip) files
- Place these files somewhere on your System i server. In this example, we use /home/zip.
- You will also need the gunzip tool to uncompress the unz550x-aix5L.tar.gz file. It will be available in ZipFiles.zip file whic you have downloaded earlier
Place the file in the same directory as the other two files.
Review the license agreement for the downloaded tools.
- Sign on to your System i server and start an i5/OS PASE terminal with the command:
CALL QP2TERM
- Change to the /home/zip directory:
cd /home/zip
- The unzip file is a compressed file. Uncompress this file:
uncompress gzip.1.2.4a.tar.Z
- “Untar” the gzip tar file:
tar -xvf gzip.1.2.4a.tar
It installs the executable files under the /usr/local/bin directory.
- Update the PATH variable with the /usr/loca/bin directory by running this command:
export PATH=$PATH:/usr/local/bin
- Uncompress the unz550x-aix5L.tar.gz file using this command:
gunzip unz550x-aix5L.tar.gz
- “Untar” the uncompressed file:
tar -xvf unz550x-aix5L.tar
It creates the directory unzip-5.50.
- Change to this directory:
cd unzip-5.50
- Enter the following command:
unzip
It shows you the command usage text.
- To run the command from any directory and any terminal window, you have to copy the unzip file into the /QOpenSys/usr/bin directory:
cp unzip /QOpenSys/usr/bin
- Switch back to the directory to which you have downloaded the files:
cd /home/zip
- Now check whether unzip is really working. The Zip program on our system is packed in the zip file - zip23x-aix43.zip, so we can try on that one. Verify that you are in the directory in which the zip23x-aix43.zip file is located. Enter the following command:
unzip -d ./zip zip23x-aix43.zip
- This creates a directory named zip and places all files into that directory. Change to this directory:
cd zip
- Issue the following command to see if the program is working:
zip
This will show the usage notes.
- To make the command available in every i5/OS PASE terminal session, copy the program into the /QOpenSys/usr/bin directory.
cp zip /QOpenSys/usr/bin
- To use both commands (zip and unzip) in QShell, make another copy of the programs into the /usr/bin directory by running 2 commands:
Please login or register to add comments |