The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 02:15 PM
Question about Restricting Search path of FIND to current directory super_duper_guy UNIX for Dummies Questions & Answers 2 10-17-2005 09:10 AM
cd into home directory ~ here2learn UNIX for Dummies Questions & Answers 4 04-12-2005 09:20 AM
I need a path to install UNIX on my home PC chutt UNIX for Dummies Questions & Answers 6 02-06-2004 12:12 PM
c++ home directory?? user666 UNIX for Dummies Questions & Answers 3 03-16-2002 09:49 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-10-2001
jpprial jpprial is offline
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
  #2 (permalink)  
Old 09-10-2001
rwb1959's Avatar
rwb1959 rwb1959 is offline
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 (permalink)  
Old 09-10-2001
LivinFree's Avatar
LivinFree LivinFree is offline Forum Advisor  
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
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:33 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0