Re: [PATCH 6/7] whereis: canonicalize files before printing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 20, 2013 at 12:56 PM, Karel Zak <kzak@xxxxxxxxxx> wrote:
> On Sat, Mar 16, 2013 at 11:40:18PM +0000, Sami Kerola wrote:
>> The whereis gives promise to find files so it seems to be more correct
>> print symlink destinations than locations of symlinks.
>
>  Not sure. I think it's correct to canonicalize directory paths (to
>  avoid problems like /bin -> /usr/bin symlinks), but I don't see
>  a reason to canonicalize whole paths (filenames).
>
>  For example
>
>     $ whereis -b bzcat
>     bzcat: /usr/bin/bzcat
>
>  is expected answer, but
>
>     $ whereis -b bzcat
>     bzcat: /usr/bin/bzip2
>
>  looks strange. The another story is that many things are redirected
>  by symlinks to /etc/alternatives and then to pretty specific places.
>
>  Maybe we can add an option to canonicalize, but from my point of view
>  it should not be enabled by default.
>
>  I have applied patch to canonicalize directory names.

Hi Karel,

Thank you for the additional work put to whereis(1) patch series.

I agree. Additional --canonical option is right way to expose where
files are. I will have a look of this sometime later the week(end).

-- 
   Sami Kerola
   http://www.iki.fi/kerolasa/
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux