I can't see the difference between the two commands
hi
Im using the following command to restart automounter: /etc/rc.d/init.d/autofs restart But if I first browse to directory in which autofs resides in: cd /etc/rc.d/init.d ;and then try to issue command: autofs restart I get command not found error. Why is the first command working and second isn't?I can't see any difference between the two of them? thank you |
Because /etc/rc.d/init.d/ is not in your path to execute commands. Either add that path to your $PATH or you will either have to type the full path to it or cd into the directory and issue a ./ in front of the command.
|
Try ./autofs restart
That means "the file is in the directory I am working in". |
great,it works:)
But why can you run files from same directory and not programs? in doesn't make sense thank you:) |
All times are GMT -5. The time now is 03:02 PM. |