find -lname and -ilname implemented

Jonathan McKeown jonathan+freebsd-hackers at hst.org.za
Sun Feb 24 14:54:05 UTC 2008


On Sunday 24 February 2008 01:48, M. Warner Losh wrote:

> The change absolutely makes sense, and so far none of the arguments
> against it are really worth the time to respond to.  I'm using
> packages not in the ports system.  Frankly, the more gratuitous
> differences with the gnu tools we have, the harder the sell will be
> for companies wanting to replace their Linux systems with FreeBSD
> ones.  The changes I made were absolutely trivial in the scheme of
> things.
>
> This knee-jerk reaction against gnu find functionality baffles me.
> The changes are trivial and make FreeBSD more compatible.  It is such
> an obvious no-brainer that I frankly didn't expect anybody to bat an
> eye.

You're adding some functions from GNU find which may or may not be currently 
available, and some synonyms for existing functionality to emulate GNU 
behaviour. You're right - that's reasonably unexceptionable, although it's by 
no means clear whether -lname name refers to the name of the link, as the 
revised manpage suggests (making it just an abbreviation for -name name -type 
l), or the name of the link's target, which is useful as there's currently no 
way to do that (I'm assuming that when DES tells me it does the latter, it's 
based on reading the source, which I haven't done).

If you'd simply said that, I doubt you would have got much reaction at all. It 
was more the lengthy discussion of how we ``must'' be GNU-compatible, which 
prompted (certainly in my case) a philosophical discussion.

Incidentally, while there are differences between the GNU tools and the BSD 
versions, I'm not sure (other than sheer weight of numbers) why that is 
judged to be a problem of ``gratuitous differences'' on the FreeBSD side, or 
why it is FreeBSD that must be ``more compatible'' with Linux rather than 
there being a mutual effort towards interoperability.

Look at the find(1) manpage. It was already long, complex and intimidating. 
It's now a little longer to read, a little more complex to understand (do all 
these multiple options which appear to mean the same thing actually do 
different things, or not?), and a little more intimidating - and it's one of 
those manpages that people probably read over and over again (I know I often 
have to check the details of options for a complicated invocation).

The gain is that we can now tell people not to worry about the fundamental 
differences between Linux and FreeBSD, because we've fixed a couple of 
trivial differences. Oh, and we've done it by adding marginally useful 
complexity to FreeBSD, which has always struck me as elegant and simple 
compared to the GNU/Linux kitchen-sink approach.

FreeBSD and Linux are different. If it isn't the arguments to the find command 
that trip up potential converts, it'll be something else - unless we convert 
FreeBSD into Linux, at which point we can all go home.

I'm sorry, I seem to be jumping up and down on you rather hard and in heavy 
boots over something quite minor. That's not my intention; but I would like 
to see a bit more discussion (perhaps in a more appropriate forum) about this 
more general issue: to what extent does the need for GNU compatibility 
override the desire for elegant and coherent design?

Jonathan


More information about the freebsd-hackers mailing list