LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 06-26-2003, 10:21 AM   #1
chedmaster
LQ Newbie
 
Registered: Jun 2003
Posts: 1

Rep: Reputation: 0
Full Path problems


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?
 
Old 06-26-2003, 10:24 AM   #2
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
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.
 
  


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

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

All times are GMT -5. The time now is 09:39 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