You can store the utility in /usr/local/bin/ (source directory) and then create a symlink of it in /opt/myutil/bin (i.e. target directory) OR in your home directory, like this:
Code:
cd /opt/myutil/bin
ln -s /usr/local/bin/myutility myutility
OR To add a symlink in home dir:
Code:
cd /home/username
ln -s /usr/local/bin/myutility myutility
Then, in /opt/myutil/bin or /home/username, using
ls -l you will see something like:-
Code:
...... myutility -> /usr/local/bin/myutility
And you can then invoke
myutility while residing in /opt/myutil/bin or in /home/username dir. and you won't need to add any dir. to your PATH variable.