The whereis implementations of FreeBSD, macOS, NetBSD, and OpenBSD do
not strip suffixes. Although whereis is not a POSIX tool and has no
shared standard, even its manual page indicates that the supplied names
are command names.
Commands do not have a suffix on Linux systems.
Stripping suffixes actually leads to issues with tools like fsck.ext4,
since fsck.ext4 is not the same tool as fsck and definitely not the same
tool as fsck.minix.
Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
.SH DESCRIPTION
.B whereis
locates the binary, source and manual files for the specified command names.
-The supplied names are first stripped of leading pathname components and any
-(single) trailing extension of the form
-.BI . ext
-(for example:
-.BR .c )
+The supplied names are first stripped of leading pathname components.
Prefixes of
.B s.
resulting from use of source code control are also dealt with.
want & BIN_DIR ? "bin" : "",
want & MAN_DIR ? "man" : "",
want & SRC_DIR ? "src" : ""));
- p = strrchr(patbuf, '.');
- if (p)
- *p = '\0';
if (!uflag)
/* if -u not specified then we always print the pattern */