LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 02-07-2004, 12:11 PM   #1
neilcpp
Member
 
Registered: Jul 2003
Location: England
Distribution: Debian Wheezy, FreeBSD 10.0 anything *nix to get my fix
Posts: 328

Rep: Reputation: Disabled
BASH search path problem




At the moment if i try to run a program (which i wrote) from my current directory with bash, it does not recognise the program. SO I have to type:

'./' before the executable name to make bash find it.

I want to fix bash so that when i type in a executable name, it will automatically search the current directory. My question is this:

1. What file do i need to edit?

2. What exactly do i need to put in this file?

Thanks
 
Old 02-07-2004, 12:15 PM   #2
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 58
your questions are answered here
 
Old 02-07-2004, 12:35 PM   #3
neilcpp
Member
 
Registered: Jul 2003
Location: England
Distribution: Debian Wheezy, FreeBSD 10.0 anything *nix to get my fix
Posts: 328

Original Poster
Rep: Reputation: Disabled
This does not answer my question. I get the message ./ not a valid identifier whenever i login now that i changed .bashrc

Can anybody help with this problem please? I dont know what file to change or where to put the changes.
 
Old 02-07-2004, 01:50 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,972
Blog Entries: 11

Rep: Reputation: 876Reputation: 876Reputation: 876Reputation: 876Reputation: 876Reputation: 876Reputation: 876
Well, that just says you didn't quite understand
how the PATH works... :) The thread DrOzz pointed
you to, together with man bash, would have given
you the answer ...

What you want to do (even though it's a STUPID
thing to do in general, for security reasons) is to
add the local dirctory to your path

export PATH=$PATH:.


Cheers,
Tink
 
Old 02-07-2004, 02:04 PM   #5
neilcpp
Member
 
Registered: Jul 2003
Location: England
Distribution: Debian Wheezy, FreeBSD 10.0 anything *nix to get my fix
Posts: 328

Original Poster
Rep: Reputation: Disabled
the thread was about adding kde to path . i did not want to do that... but i searched on the internet and found that adding this line to my .bashrc works:

export PATH=/directory/of/bin/that/you/want/:$PATH
 
  


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
PHP search path jmanjohn61 Linux - Software 2 01-21-2009 12:47 PM
adding to search path sefzik Linux - Software 2 01-28-2005 02:26 PM
Newbie bash path parse problem ericcarlson Linux - Newbie 4 08-05-2004 10:43 AM
How to Chnage Python's module search path (sys.path)? lramos85 Linux - Software 1 05-02-2004 06:10 PM
How do I change python search path Giallo998 Linux - Software 1 10-22-2003 07:27 PM


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

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