I have two programs named abc in different directories (/dir1/ and /dir2/). Each of these directories contains other programs. In general, I would like dir1 to be searched for a command before dir2. However, in the case of abc I would like the version in dir2 to be executed by default. How can I make this happen?
I tried aliasing via alias abc="/dir2/abc" however that doesn't work if the command is invoked by another program. How can I make it be the default anytime somebody attempts to invoke abc?
برچسب:
نویسنده: استخدام کار