Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Aug 2002 09:42:58 -0400 (EDT)
From:      John Bleichert <syborg@stny.rr.com>
To:        Roman Neuhauser <neuhauser@bellavista.cz>
Cc:        Grant Cooper <grant.cooper@nucleus.com>, <questions@FreeBSD.ORG>
Subject:   Re: executing a file in general
Message-ID:  <Pine.LNX.4.44.0208060939400.6505-100000@janeway.vonbek.dhs.org>
In-Reply-To: <20020806133059.GX1066@freepuppy.bellavista.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
> > From: "Grant Cooper" <grant.cooper@nucleus.com>
> > To: <questions@FreeBSD.org>
> > Subject: executing a file in general
> > Date: Tue, 6 Aug 2002 07:04:57 -0600
> > 
> > I normally use sh to execute a shell file even though some examples
> > don't do it. I figure it has to do something with my shell. And than
> > there are other times its not a script, but an executable file. Some
> > files I can't run. Is there a command to man for this op? Or something
> > to get me started?
> > 
> > For example: 
> > # var/qmail/bin/qmail-popup blah /bin/checkpassword pwd
> > invalid command or file name - couldn't do a sh either. And I am
> > running from route.
> 

If you start a command string with a directory without a leading '/' your 
shell will look in your current working directory for that directory, and 
if it doesn't find it, the command won't work. This is a relative path. If 
you start a command string with a '/' your shell will start at the top of 
the tree and look for your directory/command there. This is an absolute 
path.

To run any executable in your current directory, use './command' - './' is 
just  pointer to the current working directory, which should *not* be in 
your $PATH.

Is this what you were asking?


/* 
 * John Bleichert
 * syborg@stny.rr.com
 * http://vonbek.dhs.org/latest.jpg
 */


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.44.0208060939400.6505-100000>