Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/usr.bin/find
In article <435842B4.9090801%NetBSD.org@localhost>, Elad Efrat
<elad%NetBSD.org@localhost> wrote:
>Zafer Aydogan wrote:
>
>> I discovered it writing a shell skript for
>> NetBSD.
>
>That does what? send PRs?
>
>> I discovered that find was working with double slashes.
>
>I'm sure many people "discovered" it before you did.
>
>> I checked
>> Linux, FreeBSD and Solaris where this Problem does not accur.
I don't see that:
# uname -a
Linux xxx 2.6.11-ts6 #10 SMP Wed Aug 17 20:22:03 GMT 2005 i686 athlon i386
GNU/Linux
# find //bin/// | tail -1
//bin///zsh
# uname -a
SunOS xxx 5.8 Generic_117350-05 sun4u sparc SUNW,Sun-Fire-V210
# find //bin/// | tail -1
//bin///
I think that canonicalizing the paths in find is expensive and it is
wrong to do it by default. If you want canonicalized paths, this should be
done via a find option or in a separate program. Finally the level of
canonicalization is also questionable: Do you want find to return a physical
canonicalized path, or a logical one? I.e. if you do:
find /usr/old//foo
and /usr/old -> /net/storage/old do you want find to print "/usr/old/foo"
or "/net/storage/old/foo"? And of course this situation is trickier if you
try to logically canonicalize /usr/old/../foo.
christos
Home |
Main Index |
Thread Index |
Old Index