Re: despair
- From: briggs@xxxxxxxxxxxxxxxxx
- Date: 20 Sep 2007 12:49:58 -0500
In article <1190309266.107100.248910@xxxxxxxxxxxxxxxxxxxxxxxxxxx>, AEF <spamsink2001@xxxxxxxxx> writes:
On Sep 20, 12:24 pm, "Tom Linden" <t...@xxxxxxxxxxxxxx> wrote:
On Thu, 20 Sep 2007 09:04:34 -0700, AEF <spamsink2...@xxxxxxxxx> wrote:
Tell that to Paul Raulerson. It wasn't my idea. I was demonstrating
how his suggested equivalent doesn't work. Why the "./"? I know it
runs things a little differently than without it, but I forget exactly
how.
That has to do with the PATH environment variable which tells the shell
the order of search. ./ just means current directory
--
PL/I for OpenVMSwww.kednos.com
There must be something more to it.
No. There isn't anything more to it.
Aren't you already in the current
directory?
Yes. You are. But that doesn't mean that a token that you type
at the beginning of a command line is treated as a request to
look for like-named file in the current directory and execute it, if
found.
It is treated as a request to look for a like-named file in your $PATH
and execute it, if found.
Your current directory may or may not be in your $PATH. One common
anti-trojan measure is to ensure that the current directory is
not in your $PATH.
Just as on VMS, the current default directory is used as a default
directory in which files specified with unqualified file names are
found or created and as a starting point for locating files specified
with relative directory names.
(On Unix, relative names are names such as foo/bar.dat or ../../foo/bar.dat
and on VMS relative names are names such as [.foo]bar.dat or [--.foo]bar.dat)
Is there some way to be somewhere else? You could use SYS
$DISK:[] as the same in VMS (as long as you're not a directory such as
SYS$STARTUP) to mean "current directory", but few people bother to
type it in!
Compare to DCL$PATH. If SYS$DISK:[] is not in DCL$PATH then
the existence of FOO.EXE in your default directory will not
make "$ FOO BAR" a meaningful DCL command.
Same way, if ./ is not in $PATH then the existence of foo
in your default directory will not make "csh> foo bar" a meaningful
C shell command.
(Though typing [] for current directory can in the case of.
being in SYS$STARTUP be used to refer to the "current directory"
instead! But I don't see how that would apply in Unix.)
AEF
- Follow-Ups:
- Re: despair
- From: AEF
- Re: despair
- References:
- Re: despair
- From: Paul Raulerson
- Re: despair
- From: AEF
- Re: despair
- Prev by Date: Re: despair
- Next by Date: Re: despair
- Previous by thread: Re: despair
- Next by thread: Re: despair
- Index(es):
Relevant Pages
|