Your path is a list of directories that your computer checks when you run a
command.  For example if netscape is in /usr/local/bin/
and /usr/local/bin/ in in your path, you can type netscape from any directory
and it will be run when it is found in you /usr/local/bin/ directory which is
in your path.  Likewise there needs to be an entry in your path that says
"check the directory I am currently in for this command".  That entry is .
So your path may look like /usr/local/bin/:/usr/bin/:.  (The dot after the last
colon says check the directory I am currently in).

In the cron situation you should use the full path when running a command, or
add the path to that command to you PATH.  So have cron call
/home/me/inn-cron-nntpsend instead of inn-cron-nntpsend.

Finally, make sure the permissions for the command you are trying to run allows
it to be executed, try chmod 755 inn-cron-nntpsend .

Michael


Frank Martini wrote:

> Why can some commands be run from the directory where they reside simply by
> typing them and pressing enter, and others have to have a './' placed before
> them?
>
> I have the application 'inn-cron-nntpsend' installed in my /etc/cron.hourly.
> For month's I've been getting 'command not found' eMailed to me by cron. I
> finally discovered that if I try to envoke the program manually from its
> directory, I get the same error. But if I type ./inn-cron-nntpsend it seems
> to run fine.
>
> How do I either modify (the permissions?) on inn-cron-nntpsend so it can be
> launched without the './' or tell cron to precede the command with './'???
>
> A real newbie question!
>
> Frank
>
> --
> Frank Martini                                 Voice: 713/621-1917
> Cadence Development                             FAX: 713/621-1960
> 5075 Westheimer, Ste. 1266             eMail: [EMAIL PROTECTED]
> Houston, Texas 77056       WWW: http://www.CadenceDevelopment.com/

Reply via email to