Re: Avoiding to type "./" before command if in same directory ?
- From: "iforone" <floydstestemail@xxxxxxxxx>
- Date: 8 Jun 2006 13:20:21 -0700
Stephen Adams wrote:
bumpy@xxxxxxxx (Carsten Eishold) writes:
If I want to execute a command whose program is in my current working
directory I have always to type "./" before the actual command. E.g.
/etc/init.d> smb start
bash: smb: command not found
/etc/init.d> ./smb start
Starting Samba SMB daemon
Is there a way of prepending automatically the ./ to every command if
necessary?
Sure. You can add "." to your $PATH. But, my strong advice is DO NOT DO
THIS. It's a security risk.
In the above case, you could add '/etc/init.d' to your path, but you're
going to run into conflicting command names. One example:
/usr/sbin/postfix
/etc/init.d/postfix
Depending on where you put /etc/init.d in your $PATH, you would have very
different behavior, and serious potential for problems.
Just type the ./ - it's the safest way to go, from every angle. It's
what every admin I know does...
Carsten Eishold is dead - otherwise he'd reply by now - .....what a
dump! ;-)
.
- References:
- Re: Avoiding to type "./" before command if in same directory ?
- From: Stephen Adams
- Re: Avoiding to type "./" before command if in same directory ?
- Prev by Date: Re: Memory scanning under Linux
- Next by Date: Re: Memory scanning under Linux
- Previous by thread: Re: Avoiding to type "./" before command if in same directory ?
- Next by thread: Re: Avoiding to type "./" before command if in same directory ?
- Index(es):
Relevant Pages
|