Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Jul 2005 01:23:51 +0300
From:      Giorgos Keramidas <keramida@freebsd.org>
To:        mdff <nospam@mgedv.net>
Cc:        freebsd-bugs@freebsd.org
Subject:   Re: find(1) man-page/find error with -x/-xdev
Message-ID:  <20050703222351.GA43904@gothmog.gr>
In-Reply-To: <20050703132417.59F34186800@mgedv.at>
References:  <20050703132417.59F34186800@mgedv.at>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2005-07-03 15:24, mdff <nospam@mgedv.net> 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
> <...works...>

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050703222351.GA43904>