[NTLUG:Discuss] run a program without ./
Cameron
hrothgar at endor.hsutx.edu
Fri Jul 21 00:00:20 CDT 2000
* llliiilll at hotmail.com [2000.07.20 23:28]:
: Hi all:
: I have some questions:
:
: 1. when I try to run a program, some of then need start with "./" and some
: of them are not? how do I set all progrms can run without "./"?
this is because your working directory is not always in your PATH. if
you want your current directory in your PATH add it in your .bashrc or
.bash_profile (assuming you use bash) like so:
PATH=$PATH:.
i'd like to point out that you make yourself more prone to trojan
attacks by adding your working directory to your path. i personally
prefer the added security and leave my working directory out of my path.
: 2. how do I add a script to init? in ther worlds, I want let ths script
: start each time I boot my system. or tell me which HOWTO should I read.
:
: Thanks a lot.
: jc
if i have some custom/personal scripts that i want to run at boot, i
usually put them in /etc/rc.d/rc.local or call them from that file. for
example, you may have an rc.firewall shell script that you want to run,
so you call/execute that from your rc.local script, and viola...you're
set.
--
cameron
More information about the Discuss
mailing list