[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to override the default executable resolution order of PATH?
From: |
Chet Ramey |
Subject: |
Re: How to override the default executable resolution order of PATH? |
Date: |
Mon, 4 May 2020 08:52:36 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
On 5/2/20 5:48 PM, Peng Yu wrote:
> Suppose
>
> 1. dir1 is before dir2 in PATH.
> 2. Most of the executables with the same name should be resolved to
> those in dir1 instead of dir2.
> 3. There are a small fraction of executables with the same name should
> resolve to those in dir2.
> 4. dir1 and dir2 can not be modified.
>
> Does anybody know the best way to fine control how the executables are
> resolved to? Thanks.
Use `hash -p'.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU address@hidden http://tiswww.cwru.edu/~chet/