Find the path of a shell command

Joe Pfeiffer pfeiffer at cs.nmsu.edu
Wed Oct 12 19:58:48 EDT 2022


Cameron Simpson <cs at cskk.id.au> writes:

> On 12Oct2022 20:54, Jon Ribbens <jon+usenet at unequivocal.eu> wrote:
>>On 2022-10-12, Jon Ribbens <jon+usenet at unequivocal.eu> wrote:
>>> On 2022-10-12, Joe Pfeiffer <pfeiffer at cs.nmsu.edu> wrote:
>>>> Jon Ribbens <jon+usenet at unequivocal.eu> writes:
>>>>> on Amazon Linux:
>>>>>
>>>>>     $ which rm
>>>>>     /usr/bin/rm
>>>>>     $ sudo which rm
>>>>>     /bin/rm
>>>>
>>>> Have some major Linux distributions not done usrmerge yet?  For any that
>>>> have, /bin is a symbolic link to /usr/bin
>
> The above example may just be a different ordering in $PATH.

Sure, but the point is OP can use either /bin/rm or /usr/bin/rm on the
vast majority of systems and execute the same command.


More information about the Python-list mailing list