[from newbies] RE: Command path

2004-06-29 Thread clayton rollins
Hi,
On June 29, 2004, [EMAIL PROTECTED] wrote:
Is there any reason why I can't directly run sysinstall when I am already
currently in the /stand directory?  The only way I can execute it is to
enter /stand/sysinstall
Is there a path configuration I can edit to get FreeBSD to search the
current directory as well as common places like /bin?
JS
I can't reply on newbies@; all technical advice should at least
be subjected to wide peer review. (It's in the list charter...)
I'm replying on questions@, which is more proper for this
discussion.
I don't know the rhyme or reason to which shells include or
don't include the current directory in the default PATH or why...
That discussion aside, the PATH is an environment variable.
The way you set (and maybe view) it is shell-dependent. I'll
give descriptions for sh and (t)csh, which are most common;
if you use another, you might write back and be more specific.
In both shells, you can view environment variables with the
command 'env'.
In sh, you could do:
'PATH=.:$PATH'
in (t)csh, you could do:
'setenv PATH .:$PATH'
Adding such a statement to your ~/.shrc and/or ~/.cshrc
startup script would save you from typing it each time...
Hope that helps,
Clayton
_
From ‘will you?’ to ‘I do,’ MSN Life Events is your resource for Getting 
Married. http://lifeevents.msn.com/category.aspx?cid=married
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: [from newbies] RE: Command path

2004-06-29 Thread Matthew Seaman
On Tue, Jun 29, 2004 at 08:11:12AM +, clayton rollins wrote:
 
 In sh, you could do:
 'PATH=.:$PATH'
 
 in (t)csh, you could do:
 'setenv PATH .:$PATH'

Generally you should be exceedingly careful about putting '.' onto
your $PATH.  You should certainly not put '.' into root's $PATH, and
preferably not at the beginning of the $PATH for ordinary users.

ie. If you must put '.' in your path, do it like this:

PATH=${PATH}:. ; export PATH

or

setenv PATH ${PATH}:.

The danger with having '.' on a the $PATH is that you can trick
(deliberately or not) people into running trojan programs.  Bad for
ordinary users, disasterous for root.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK


pgpxhOJwgkyTF.pgp
Description: PGP signature