LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 06-01-2004, 02:48 PM   #1
moby
Member
 
Registered: May 2004
Location: Austria
Posts: 30

Rep: Reputation: 15
$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
 
Old 06-01-2004, 02:52 PM   #2
youngstorm
Member
 
Registered: May 2003
Location: Valdosta, GA, USA
Distribution: Fedora 14, Windoze XP & 7
Posts: 225

Rep: Reputation: 31
Hi,
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
Michael
 
Old 06-01-2004, 02:54 PM   #3
lyceum
Member
 
Registered: Aug 2003
Location: N.C.
Distribution: rh9, fc1, slack 9.1, 10
Posts: 229

Rep: Reputation: 30
you can find out what directories are in your PATH by typing:
Code:
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.
 
Old 06-01-2004, 03:18 PM   #4
moby
Member
 
Registered: May 2004
Location: Austria
Posts: 30

Original Poster
Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing the PATH variable pppaaarrrkkk Linux - Newbie 1 12-01-2005 09:00 PM
PATH variable jk21 Linux - Newbie 1 09-28-2004 02:48 PM
the path variable mjkramer Linux - Newbie 4 10-18-2003 07:18 AM
PATH variable file pongsu Linux - General 2 09-25-2003 04:13 AM
setting path variable shahrahulb Linux - General 2 07-30-2003 08:25 PM


All times are GMT -5. The time now is 02:31 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration