![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| echo $PATH doesn't match $HOME/.profile | Veestan | UNIX for Dummies Questions & Answers | 1 | 04-17-2008 11:15 AM |
| Question about Restricting Search path of FIND to current directory | super_duper_guy | UNIX for Dummies Questions & Answers | 2 | 10-17-2005 06:10 AM |
| cd into home directory ~ | here2learn | UNIX for Dummies Questions & Answers | 4 | 04-12-2005 06:20 AM |
| I need a path to install UNIX on my home PC | chutt | UNIX for Dummies Questions & Answers | 6 | 02-06-2004 09:12 AM |
| c++ home directory?? | user666 | UNIX for Dummies Questions & Answers | 3 | 03-16-2002 06:49 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
home directory in search path
Is it unsafe to put your own home directory (a regular user) in your search path? I am writing useful shell scripts, but don't have the permissions to put them in /usr/bin. (Korn shell)
thanks |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
In general, it is no less safe than anything
else. Just follow certain rules. You will want to "append" this to the default PATH. export PATH=$PATH:$HOME What you don't want to happen is you don't want to run you own version of commands. For instance, if you had your own "ps" command you would not want that one to be found in the search path first. |
|
#3
|
||||
|
||||
|
A very common thing to do is create your own bin directory in your $HOME, so you can keep files seperate. I do this on nearly all of my account, both regular and root.
mkdir $HOME/bin chmod 700 $HOME/bin PATH=${PATH}:/$HOME/bin Then add that PATH addition to your .profile (or .bash_profile if needed) to make it work every time you log in. The reason I suggest the added bin directory is to keep your scripts / programs you want to use regularly seperate from test scripts, and other file that may interfere. Besides, it's just plain cool to have your own bin directory |
||||
| Google The UNIX and Linux Forums |