LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Newbie
User Name
Password
Linux - Newbie This 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
 
Thread Tools
Old 06-26-2003, 11:21 AM   #1
chedmaster
LQ Newbie
 
Registered: Jun 2003
Posts: 1
Thanked: 0
Full Path problems


[Log in to get rid of this advertisement]
My company just switched to SCO United Linux from Unix.

In Unix, to call a script or executable in the current directory, all that was needed was to type in the name, e.g.

% test.sh

In the new Linux box, to do the same thing, I either have to type the full path to the script, or use a ./ before the name, e.g.

% /home/user/test.sh OR
% ./test.sh

I realize this is a problem with the PATH to the file. How can I include the current working directory in the PATH other than adding every directory a script may be in?
chedmaster is offline     Reply With Quote
Old 06-26-2003, 11:24 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 33,320
Thanked: 182
it's not a "problem" that is the correct behavior. you should never have your current directory on your path. the commands you can run should not be affected by the directory you are in in most cases. i'd just assume that your syadmin or whatever had put . onto the end of your path statement, which is not a good idea.
acid_kewpie is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
full path of a file ttilt Linux - General 1 11-08-2005 07:02 PM
Need to specify the full URL path.. Why? soichih Linux - Networking 3 07-31-2004 09:37 AM
get full path of a command (in C) Hady Programming 9 11-21-2003 11:50 AM
get full path of a command (in C) Hady Linux - Software 1 11-19-2003 06:46 PM
How to get executable's full path using C/C++? oldbee Programming 6 02-19-2002 10:21 AM


All times are GMT -5. The time now is 03:43 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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration