30 Linux Applications on pSeries
Using relative or absolute path
To use a Toolbox RPM package command with its relative or absolute path, you
must of course know where it is stored in your file system hierarchy. In the next
two examples we use the /usr/linux/bin/ls command from the fileutils RPM
package downloaded from the Toolbox Web site, and our current directory is
/home/work. Installation will be covered in greater detail in 2.3.3, “How to install
and manage the Toolbox RPM packages” on page 36.
The first example is using the
absolute path to the ls command with the --color
The second example is using the relative path to the ls command with the --help
option (our current directory is /home/work):
Using PATH search preference
To have the Toolbox RPM package commands to be found first by the running
Korn shell (or a similar shell), we can use the PATH variable and point it to
/usr/linux/bin before the other directories to be searched. Below we show how to
set the PATH variable in the current Korn shell environment:
In Example 2-1 on page 31, first we use the AIX nl command, then export the
new PATH environment variable, pointing to /usr/linux/bin first, and then use nl
again (/usr/linux/bin/nl is a symbolic link to /opt/freeware/bin/nl). As you can see
from the output, it is two different commands that are used in each instance.
Note: Changing the PATH variable may cause conflicts with and malfunctions
in some AIX applications, specifically SMIT. It might be necessary to change
the PATH, depending on the tasks to be performed.
Do not change the PATH environment variable in /etc/environment, /etc/profile,
or any other user environment file that is used by applications started by init
at IPL (boot-time).
For system administrators it is not recommended to set or use the
/usr/linux/bin prior to AIX directories in the PATH environment variable at login
time. Use an environment loading script that can be run manually or by
specific applications, such as aixterm (using the ENV variable mechanism in
Korn shell), or alias the desired Toolbox commands.
For users and developers, please use your own preference.