LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 01-24-2005, 11:57 PM   #1
zchoyt
Member
 
Registered: Feb 2003
Location: Boise ID
Distribution: fedora
Posts: 156

Rep: Reputation: 30
want to type <exename> instead of ./<exename>


I somehow got my FC2 box to behave this way, but I don't remember how. Does anyone know? I have a FC3 box now and I have to always type ./ in front of the exe name.
 
Old 01-24-2005, 11:58 PM   #2
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
While this is a security risk, the solution is to add . to your $PATH. You can do so with this command:
Code:
export PATH "$PATH:."
 
Old 02-02-2005, 09:48 PM   #3
zchoyt
Member
 
Registered: Feb 2003
Location: Boise ID
Distribution: fedora
Posts: 156

Original Poster
Rep: Reputation: 30
What would the exact syntax be to add this to the .bash_profile file?

Here is what I have tried:
PATH=$PATH:$HOME/bin:.
PATH=$PATH:$HOME/bin:"."
PATH=$PATH:$HOME/bin:'.'


When I go to source the file, I keep getting "not a valid identifier":
............/root/bin:/root/bin:.': not a valid identifier


I obviously have the syntax wrong.

Please help
 
Old 02-02-2005, 10:02 PM   #4
beaucoup
Member
 
Registered: Jun 2003
Location: Florence, SC
Distribution: Gentoo i386
Posts: 180

Rep: Reputation: 30
try

PATH="$PATH:$HOME/bin:."
 
Old 02-03-2005, 12:05 AM   #5
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
You have to export the PATH variable to the Shell. In your .bash_profile

Code:
export PATH=$PATH:$HOME/bin:.
Quote:
When I go to source the file, I keep getting "not a valid identifier":
............/root/bin:/root/bin:.': not a valid identifier
Don't do this for the root user. It is a security risk. Only add the current directory to the path for non-root users.

I hope this helps
--Ian
 
Old 02-03-2005, 03:41 AM   #6
zchoyt
Member
 
Registered: Feb 2003
Location: Boise ID
Distribution: fedora
Posts: 156

Original Poster
Rep: Reputation: 30
Ok, I was beeing hasty. I didn't include the export keyword. Thanks
 
Old 02-03-2005, 06:57 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
oh please don't do this, it's really really nasty.

it doesn't make any sense to be able to run a command from one driectory, and not from another. please stick to standards, they are there for a VERY good reason.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
installing redhat 8.0 when text login in I cannot type password?? I type root scrist Linux - General 4 04-22-2006 02:20 AM
list<type> how can I make type be a pointer? exodist Programming 2 06-06-2005 08:40 AM
arrays of elements with [gcc4]array type has incomplete element type lmmix Linux - Software 0 02-26-2005 08:07 AM
root (hd 0,0)Filesystem type unknown, partition type 0x7chainloader +1 ece30675 Linux - Distributions 5 07-20-2004 09:04 AM
where I can find user type Access gorup type and access satishpatel Linux - General 0 04-07-2004 05:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:36 PM.

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