It is for security reasons that the current folder is not in your search path by default.
This is to protect you from accidentally running trojans (e.g. someone could write one called "ls" or something similar that is used frequently, or password harvesting tools, e.g. called "su") that people have dropped in a directory that you just happen to be sitting in when you run it.
There's nothing to stop you adding "." to your PATH though if you wish.
Code:
PATH=$PATH:.
Annihilannic
[small]tgmlify - code syntax highlighting for your tek-tips posts[/small]
The vulnerability is the same as including . in the [tt]PATH[/tt]. The only difference is, this applies to a single file, not all. But if a bad guy creates a nasty /tmp/goforit.bin script, if you will ever execute goForIt in the /tmp/ directory you get in trouble. The alias advice is good, but use absolute path.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.