LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-30-2002, 08:45 AM   #1
bob10a
LQ Newbie
 
Registered: Jan 2002
Posts: 24

Rep: Reputation: 15
running program in local directory


My linux box has suse 8 installed. I am running my own code and always I need to execute it as "./mycode.exe". When running scripts the "./" could be annoying.

Is there a way to configure my computer so that I get rid of the "./". Thanks in advance.
 
Old 10-30-2002, 08:56 AM   #2
dkaplowitz
Member
 
Registered: Oct 2002
Location: Havertown PA
Distribution: Ubuntu/RHEL/Fedora
Posts: 253

Rep: Reputation: 31
Put file in one of your PATH directories, or a link to it

at the command prompt, enter "echo $PATH" that will tell you what paths you're using for commands.

What I suggest is creating a ~yourhomedir/bin directory and adding that directory to your path. Then put your scripts and executables in that directory.

If you don't like that idea, just put the executable in one of the paths that the above command spits out, or put a link to the executable in one of those dirs.

Good luck
 
Old 10-30-2002, 09:36 AM   #3
bob10a
LQ Newbie
 
Registered: Jan 2002
Posts: 24

Original Poster
Rep: Reputation: 15
That solves the problem, but then I have to put all the executables and scripts in /myhome/bin/ and it doesn't work for me (too may executables). Any more ideas!!!
 
Old 10-30-2002, 09:38 AM   #4
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
You can modify your path to include current directory (.) in it, but it is a security hole, so it is not advisable:
export PATH=$PATH:.
 
Old 10-30-2002, 09:39 AM   #5
frankietomatoes
Member
 
Registered: Oct 2002
Posts: 44

Rep: Reputation: 15
Easy, add your current directory to your PATH


ex. from .bashrc


export PATH=.:$PATH

the . means the current directory
the : is a seperator

I think that's what your looking for.
 
Old 10-30-2002, 09:40 AM   #6
frankietomatoes
Member
 
Registered: Oct 2002
Posts: 44

Rep: Reputation: 15
Beaten to the punch
 
Old 11-04-2002, 06:48 PM   #7
bob10a
LQ Newbie
 
Registered: Jan 2002
Posts: 24

Original Poster
Rep: Reputation: 15
Hey, Could you please be more specific about the security holes this action would have?. Thx.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to install rpm from local directory using apt-get? Miro1 Linux - Software 6 07-11-2013 10:34 PM
How do I add a local directory as an YaST repository. simjii SUSE / openSUSE 4 04-03-2006 10:07 AM
Why is the directory called /usr/local. jschiwal Linux - General 6 06-30-2004 02:05 PM
Draksync 2 local directory ?? rdoucet Mandriva 2 03-07-2004 04:59 PM
/usr/local/vmware ?? directory change!! paulo Linux - Security 4 07-09-2003 08:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:49 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration