From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,5d8e01a811b436e0 X-Google-Attributes: gidfee84,public From: Dan.Pop@mail.cern.ch (Dan Pop) Subject: Re: help!! Date: 1995/06/22 Message-ID: #1/1 X-Deja-AN: 104877185 sender: news@news.cern.ch (USENET News System) x-nntp-posting-host: ues5.cern.ch references: <3scmi3$pck@ixnews6.ix.netcom.com> organization: CERN European Lab for Particle Physics newsgroups: comp.unix.osf.osf1 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