find(1) man-page/find error with -x/-xdev

mdff nospam at
Tue Jul 5 15:32:46 GMT 2005

i knew arg-order is important, but in this case
i didn't get it... therefore i'll send further
requests on that to the RTFM/PEBKAC-list |-)
*thx* for the infos & cu ;-)

-----Original Message-----
From: owner-freebsd-bugs at [mailto:owner-freebsd-bugs at]
On Behalf Of Giorgos Keramidas
Sent: Monday, July 04, 2005 12:24 AM
To: mdff
Cc: freebsd-bugs at
Subject: Re: find(1) man-page/find error with -x/-xdev

On 2005-07-03 15:24, mdff <nospam at> wrote:
> as documented on 5.4-RELEASE, there's a divergence between
> man 1 find and the command itself and the option "-x" a.k.a. "-xdev".
> although "-xdev" is "deprecated", it's the only working one ;-)
> $ man 1 find
> <...snip...>
>      -x      Prevent find from descending into directories that have a
> device
>              number different than that of the file from which the descent
>              began.
>              This option is equivalent to the deprecated -xdev primary.
> <...snip...>
> $ find . -x
> find: -x: unknown option
> $ find . -xdev
> <>

The two (-x and -xdev) are slightly different, but the small difference
is very important.  The -x option is a find(1) option, while -xdev is an
"expression predicate" or "primary" as the description of -x calls it.
Options should appear *before* any path names, while "primaries" should
appear *after* path names.  This means that these two are valid:

	find -x .
	find . -xdev

But these are not:

	find . -x
	find -xdev .

Bearing this in mind, do you still think that the manpage is wrong?

If yes, suggestions to improve the wording of the description of the -x
option are certainly welcome.

- Giorgos

freebsd-bugs at mailing list
To unsubscribe, send any mail to "freebsd-bugs-unsubscribe at"

More information about the freebsd-bugs mailing list