Click to See Complete Forum and Search --> : short cut commands


npereira
08-20-2001, 08:53 PM
I would like to execute a command anywhere i am in the directories... i don't want to have to go to the specific directory to execute a command that is located in that directory...

Basicaly i would like a batch file that is executable in any paths.

how can i do this ...

One of them is mysql

Whipping Boy
08-20-2001, 09:47 PM
1) They're "shell scripts", not "batch files"

2) You don't need a shell script, you just need to make sure the location of the program is in your PATH environment variable. mySQL should be unless you specifically told it to go somewhere else

3) Stop confusing the Linux command line with the DOS command line :)

npereira
08-20-2001, 09:52 PM
OK !

But can you tell me exactly how to do this??

Dark Ninja
08-21-2001, 12:35 AM
Hmmmm...if I remember correctly...

PATH=$PATH:/path/goes/here
export PATH

I really don't remember if you have to be root (I assume so). Actually, this gave me some problems doing this at one time. Like...it worked fine until I rebooted Linux. I checked /etc/profile and I didn't see ANY kind of PATH's in there. Any help on that?

Dark Ninja