LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   bash: command not found (https://www.linuxquestions.org/questions/linux-newbie-8/bash-command-not-found-345167/)

intels_ss 07-20-2005 06:36 PM

bash: command not found
 
When trying to run an executable script from a folder within my Home directory and I get the following:

bash: unravel: command not found

If I run the same command from

$home/bin

it works fine.

How can I get executable scripts to run from any folder within $home and not just from /bin ??

-- btw, I'm obviously a rank newbie.

much thanks.

tuxdev 07-20-2005 06:41 PM

change your $PATH to include $home/bin with env, setenv, I don't remember exactly how.

Garda 07-20-2005 06:42 PM

howto add to path
 
suppose you have a directory ~/scripts
to add it to your path you type

export PATH="$PATH:~/scripts"

Tinkster 07-20-2005 06:45 PM

Or just precede it with a ./, as in
./unravel
(That's assuming that unravel is in your current
working dir). The next alternative is to:
export PATH=$PATH:.

Doing that for the root-user would be a bad idea,
btw...


Cheers,
Tink

intels_ss 07-20-2005 07:05 PM

Basically I have a handful of scripts that I want run from various folders (which are different projects) that are stored in my home directory. For example, I'd like to run a script called "unravel" from Folder1.

So to really show my newbie-ness....is the path edited in the bash_profile or from a .cshrc ?

currently the bash_profile reads:

PATH=$PATH:$HOME/bin

export PATH=$PATH
unset USERNAME

Not sure if this is where you all are referencing?

Garda 07-20-2005 07:41 PM

you should be able to add it there in .bash_profile

try changing
PATH=$PATH:$HOME/bin

to

PATH=$PATH:$HOME/bin:$HOME/folder1:$HOME/folder2

etc.

.cshrc is the config file for csh or tcsh which are different shells to bash.


All times are GMT -5. The time now is 09:16 AM.