qiang8
asked on
Newbie...why can't execute command?
I've created a file "myfile" with the following simple line:
history | tail -10 | more
then, I chmod 750 myfile so that it become exe file. But when try to execute, the following error:
bash: myfile: command not found
Pls advise....thanks.
history | tail -10 | more
then, I chmod 750 myfile so that it become exe file. But when try to execute, the following error:
bash: myfile: command not found
Pls advise....thanks.
ASKER
It still can't work.....anywhere thanks for ur prompt reply.
I have included "myfile" directory in the .cshrc file as below but still fail.
set path =(/bin:/usr/bin......)
### where /bin contains myfile ####
error:
myfile:command not found
Pls advise and suggest what other things that I shall do. Any global setting that I might miss out? Thanks.
I have included "myfile" directory in the .cshrc file as below but still fail.
set path =(/bin:/usr/bin......)
### where /bin contains myfile ####
error:
myfile:command not found
Pls advise and suggest what other things that I shall do. Any global setting that I might miss out? Thanks.
Please login and provide the output to the following commands:
1. ls -ln /bin/myfile
2. grep $USER /etc/passwd
3. echo $PATH
1. ls -ln /bin/myfile
2. grep $USER /etc/passwd
3. echo $PATH
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much for ur help ... it works
Quick note: You can get the same result for the command above with "history | tail". The default value for tail is 10 lines, so you don't really need to do a "tail -10". Unless you're doing really long commands the "more" isn't really needed since tail will automatically print it's output. Hope this helps.