Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Dan.Pop@mail.cern.ch (Dan Pop)
Subject: Re: help!!
Date: 1995/06/22	[thread overview]
Message-ID: <danpop.803864712@rscernix> (raw)
In-Reply-To: 3scmi3$pck@ixnews6.ix.netcom.com

In <3scmi3$pck@ixnews6.ix.netcom.com> t-l-c@ix.netcom.com (Charlie Giampaolo ) writes:

>Why is it that I have to type ./ then the executable file name.  Is
>there somthing to change in my profile??

Yes, but don't do it!  

You have to add . (the current directory) to your PATH environment
variable.  If you decide to do it, put it at the very end.

Why is it better to not have it at all in your PATH and to type ./prog?

Because there are thousands of Unix commands (and new ones might appear
over night in your /usr/local/bin if it's on a distributed file system) 
the chances of a clash between a user program and a system one are
pretty high.

Here is a very common example: by inadvertence, you create an executable
called "test".  Let's see what happens:

1. You have . at the beginning of your PATH (an absolute no-no for
   security reasons).  Your "test" shadows the system one and some
   scripts will misteriously fail when run from that directory but work
   fine when invoked from any other directory!
  
2. You have . at the end of your PATH.  In this case, typing "test" will
   invoke the system one, not yours, leaving you in a very puzzled state
   of mind.

In both cases you lose.  So, don't put . in your PATH and get used to
typing ./prog.  It's much better than any of the two alternatives
described above.

Dan
--
Dan Pop
CERN, CN Division
Email: Dan.Pop@mail.cern.ch 
Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland



  reply	other threads:[~1995-06-22  4:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-06-22  4:00 help!! Charlie Giampaolo 
1995-06-22  4:00 ` Dan Pop [this message]
1995-06-23  4:00 ` help!! Peter Mayne
1995-07-02  4:00   ` help!! "Mark Jeffery"
  -- strict thread matches above, loose matches on Subject: below --
1996-12-16  5:00 help Zion Huang
1996-12-17  5:00 ` help Steve Lionel
1996-12-19  5:00   ` help!!! Anthony McGarr
1996-12-20  5:00     ` help!!! John Hill
1997-01-10  5:00 Help! Toby Lau
1998-10-22  4:00 Auto-install facility? hawkeye in exile
1998-10-24  4:00 ` HELP!!!!!!! byte56
1998-10-25  4:00   ` HELP!!!!!!! Bob Harris
1998-10-27  5:00   ` HELP!!!!!!! Alan Rollow - Dr. File System's Home for Wayward Inodes.
1998-11-11  5:00   ` HELP!!!!!!! Frank Harris
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox