[plug] Questions for information

Richard wpickett at iprimus.com.au
Sun May 5 14:14:57 WST 2002


On Sunday 05 May 2002 1:58 pm, Richard Henry wrote:
> > More of a question in a similar vain than a response (hope
> > you don't mind
> > James :)...I was just wondering if anyone could tell me why
> > sometimes a
> > script or executable can be run simply by entering it's name
> > (while in the
> > same dir) and yet another has to have it's complete address
> > to run (once
> > again, even when in the same dir).
>
> Are you the same user in both cases?  If not, it's probably to do with your
> PATH environment (echo $PATH).
>
> If your path contains '.' (without the ''), it means "the current
> directory".  As such, you can be in a directory and type the name of an
> executable file there, and it will run.  It is relatively common for a
> normal user account to have '.' in their path.
>
> You normally wouldn't have it in the root users path though, due to
> security concerns (eg: a rogue user puts a script in his home directory
> that wipes the harddrive, and symlinks 'ls' and 'cd' to it - root user
> enters the directory, types 'ls' and *boom*).
>
> BTW, when in the same directory, you don't have to type the full address to
> run something - just put ./ before the name, ie:
>
> 	./myScript
>
> 	where myScript is the file you want to run.
>
> Rich.

Many thanks for the ./ tip, the . was not in my path. Where are all of a 
user's environment variables kept? (to edit path etc)

Richard



More information about the plug mailing list