On Fri, 2002-02-01 at 08:35, Jianping Zhu wrote:
I am new linux user. I can compile my c++ code in my user directoy (for example /home/username) but when I try to excute the the excutable I have to give the whole path( /home/username myexcutable) even I am in the diretory /home/username, How can I fix this problem. a couple of things to consider. What is the path? echo $PATH will show you the current path that the shell looks through for exectables. I believe RHL no longer puts the current directory in the path by default. you either: add . to your path in ~/.bash_profile (don't forget the : separator) put it in a place that the shell will look like ~/bin or to save key strokes if neither of these options are what you want you can simply type ./progname. The ./ is the current working directory. putting . in your path is considered by most to be a security issue since you might inadvertantly run a program named the same as a common command or a simple typo can cause a different program to run. Definitely not a good idea for root's account. BTW ~/ is the current user's home dir in bash anyway not sure bout other shells. HTH Bret _______________________________________________ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list