Article View: comp.unix.programmer
Article #3182Re: Geting program path
From: John Hobson
Date: Wed, 17 Apr 1996 18:15
Date: Wed, 17 Apr 1996 18:15
20 lines
1370 bytes
1370 bytes
fxfjn@camelot.acf-lab.alaska.edu (Frankie J. Nichols) wrote: >try 'which' then the command (executable) you need the path of > > -frankie > > >Highlander C H B M (l39801@ci.ist.utl.pt) wrote: > >: I need to find the path of the executable so I can stat() and touch it. >: Anybody knows how to do it ? ( geting the $PWD or getcwd() doesn't help >: cause it can be anywhere along the $PATH ) 'which' is the C-shell (boo, hiss) version. In Korn shell (huzza!), try 'whence'. -- John Hobson | The Mahatma Gandhi was once asked, "Mr Unix Support Group | Gandhi, what do you think of Western Commonwealth Edison, Chicago, IL | Civilization?" He replied, "I think jhobson@ceco.ceco.com | that it would be an excellent idea."
Technical Details
Message-ID:
<Dq0qps.D6s@ceco.ceco.com>Path:
arc1-ca.pugleaf.net!newsfeed.acns.nwu.edu!firewall!ceco!rootReferences:
<3mtt4d$6ml@alfa.ist.utl.pt> <4l0khj$va9@news.alaska.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.unix.programmer,comp.lang.c Path: arc1-ca.pugleaf.net!newsfeed.acns.nwu.edu!firewall!ceco!root From: John Hobson <jhobson@ceco.ceco.com> Subject: Re: Geting program path X-Nntp-Posting-Host: disaster Content-Type: text/plain; charset=us-ascii Message-ID: <Dq0qps.D6s@ceco.ceco.com> Sender: root@ceco.ceco.com (Operator) Content-Transfer-Encoding: 7bit Organization: Commonwealth Edison References: <3mtt4d$6ml@alfa.ist.utl.pt> <4l0khj$va9@news.alaska.edu> Mime-Version: 1.0 Date: Wed, 17 Apr 1996 18:15:28 GMT X-Mailer: Mozilla 1.1N (X11; I; SunOS 4.1.3_U1 sun4c) X-Url: news:4l0khj$va9@news.alaska.edu