-   Linux - Newbie (
-   -   $path variable ? (

moby 06-01-2004 02:48 PM

$path variable ?
Hi All

Question , if i create a /bin directory in /home/mine and put some shell scripts in it will they be picked up by the $PATH variables or are the $PATH variables only interested in searching the /dir .
The reason is that i'm creating small scripts and i would like them to run directory wide in my home dir , and try to keep them separate from root/bin.

Cheers Moby

youngstorm 06-01-2004 02:52 PM

You'll need to add it to your .bash_profile file
in your home directory. Then log out and back in.
The n run the env command to see if it is now in your PATH.

good luck

lyceum 06-01-2004 02:54 PM

you can find out what directories are in your PATH by typing:

echo $PATH
to make permanent change you can edit your .bash_profile file which should be in your home directory, (type ls -al to check) and add the path that you need. but be careful with this, as changing your path can be a security risk. another possible solution is to put the script in a directory that is already in your PATH.

hope this helps.

moby 06-01-2004 03:18 PM

Well since i canny find .bash_profile , i can find .bashrc & .bash_history .

based on the above i think placing the script in an already existing PATH
is the best bet .

Thank's for the Quick responce

Cheers Moby

All times are GMT -5. The time now is 01:25 AM.