Linux - GeneralThis 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.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am using a Red hat 9.0. As everybody may know, when we are in a directory, say mydir,
if we want to run an executable file "test" in mydir, we type:
It works ok for me but now, the executable file I run has a call to invoke another executable
file namely test2. However, this call doesn't use the "./" path, i.e just "test2" so it causes an error (command not found) although test2 is really in mydir. I couldn't change this because "test " is a binary file and there is no way to modify it. (it's not a shell script).
I want to find how I can change the configuration of the system so that if I am in "mydir" and want run an executable file "test", I have to use the command "test" instead of "./test".
Ok, let me explain my problem in another way.
I am inside the directory "mydir", so it is my current directory. In "mydir", there are two executable files, namely "test" and "test2". "test" has a call to "test2". "test" is a binary file and I can't modify it.
When I run "test", I got an error (test2: command not found) and I know it is because the command to invoke "test2" in "test" source code is "test2" instead of "./test2".
I can't modify "test". How to get rid of this problem ?
No, it's not the problem with installation or sth like that.
I have to executable files, "test" and "test2" where "test" has a call to invoke "test2" to run. I am quite sure that I have "test2" in the same directory with "test".
Normally, in Red hat, if we want to run an executable file in the current directory, we have to type: ./test . Please notice the path "./"
I know this is reason of my problem. The command to call "test2" inside "test" does not include the path "./" . It works ok with Debian but it is not the case with Red hat, where we have to include path "./" if we want to run any executable file in the current directory. I don't know whether I can change that rule. If I can do so, I can fix my problem.
Just add your home directory or the directory its located in to your $PATH or adjust your program or script with the full path to both. This is asked quite often, a search most likely will find you other solutions or more details of what I've explained you need to do.