Bug 835211 - which vs. whereis
Summary: which vs. whereis
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: util-linux
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Karel Zak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-25 19:29 UTC by Bill Nottingham
Modified: 2014-03-17 03:31 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-10-24 10:31:13 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Bill Nottingham 2012-06-25 19:29:17 UTC
Description of problem:

[notting@nostromo: ~]$ whereis bash
bash: /bin/bash /usr/bin/bash /usr/share/man/man1/bash.1.gz
[notting@nostromo: ~]$ /usr/bin/which bash
/usr/bin/bash

Ideally, they'd follow the same logic for finding the binary.

Version-Release number of selected component (if applicable):

util-linux-2.21.2-2.fc17.x86_64
which-2.20-3.fc17.x86_64

How reproducible:
100%

Comment 1 Tomas Mraz 2012-06-26 06:21:27 UTC
I think given the disclaimer in whereis manpage this is NOTABUG.

whereis has a hard-coded path, so may not always find what you're looking for.

Comment 2 Karel Zak 2012-06-26 07:11:14 UTC
(In reply to comment #1)
> whereis has a hard-coded path, so may not always find what you're looking
> for.

The note in the man page is obsolete (I'll fix it), the latest version also follows $PATH. Anyway, I think that whereis(1) should be smart enough to work with symlinks.

Comment 3 Karel Zak 2012-10-24 10:31:13 UTC
We're working upstream to improve the whereis(1) command.

Comment 4 Karel Zak 2013-03-21 07:38:20 UTC
Note that the problem is already fixed in upstream tree and the change will be available for F19/RHEL7.


Note You need to log in before you can comment on or make changes to this bug.