Can someone tell me the method to execute the script from any location on linux server whereas It resides on a particular location
e.g.: Suppose script resides at this location
/efare1/dist/src
monitor.sh
But I want If user know the name of the script he should not remember the path of that script he can run it from any location.Please let me know if this possible.
There is a shell environment variable $PATH that lists directories to search for commands. It is a colon separated list, just add /efare1/dist/src to the end of this in the users .profile (or .bash_profile) and export it: