The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


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 !!

More UNIX and Linux Forum Topics You Might Find Helpful
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

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 09-10-2001
Registered User
 

Join Date: Feb 2001
Location: San Francisco
Posts: 30
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  
Old 09-10-2001
rwb1959's Avatar
Registered User
 

Join Date: Aug 2001
Location: Virginia, USA
Posts: 438
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  
Old 09-10-2001
LivinFree's Avatar
Goober Extraordinaire
 

Join Date: Jul 2001
Location: Portland, OR, USA
Posts: 1,584
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
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 06:43 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0