LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 07-20-2005, 06:36 PM   #1
intels_ss
LQ Newbie
 
Registered: Apr 2005
Location: Port Angeles, WA
Posts: 25

Rep: Reputation: 15
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.
 
Old 07-20-2005, 06:41 PM   #2
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,014

Rep: Reputation: 115Reputation: 115
change your $PATH to include $home/bin with env, setenv, I don't remember exactly how.
 
Old 07-20-2005, 06:42 PM   #3
Garda
Member
 
Registered: May 2005
Distribution: Debian
Posts: 83
Blog Entries: 2

Rep: Reputation: 15
howto add to path

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

export PATH="$PATH:~/scripts"
 
Old 07-20-2005, 06:45 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,986
Blog Entries: 11

Rep: Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880
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
 
Old 07-20-2005, 07:05 PM   #5
intels_ss
LQ Newbie
 
Registered: Apr 2005
Location: Port Angeles, WA
Posts: 25

Original Poster
Rep: Reputation: 15
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?
 
Old 07-20-2005, 07:41 PM   #6
Garda
Member
 
Registered: May 2005
Distribution: Debian
Posts: 83
Blog Entries: 2

Rep: Reputation: 15
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash: command not found! Adil_uk Linux - General 14 04-09-2012 01:04 AM
bash: g++: command not found m_lp_ql_m Linux - Software 8 07-08-2010 01:45 PM
bash: pg: command not found Chomper Programming 2 02-05-2005 02:22 AM
-bash: ls: command not found jchun Linux - General 3 11-02-2004 10:11 AM
bash: command not found jc80 Fedora 3 03-14-2004 03:11 PM


All times are GMT -5. The time now is 07:34 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration