find [-H | -L | -P] [-EXdsx] [-f path] path ... [expression] find [-H | -L | -P] [-EXdsx] -f path [path ...] [expression] There is a `[-f path]` and `-f path` but it is explained anywhere. (There is one sentence that mentions it in the BUGS section, but it does not really explain or say what it does.) (It must not be used a lot as it was originally not documented either in the CSRG import from way back when.)
For the record, `-f path` is the same as specifying `path` as one of the starting points, but it won't conflict with other options. So you can write `-f -print` to search a directory called `-print`, or `-f \(` if the name is an open paren, etc.
Created attachment 224108 [details] manpage patch Patch attached.
@Ceri Davies, thanks for the patch, I created a differential for it.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=82483ea7adfe4213059f6dacf31f3bd1327b2cc0 commit 82483ea7adfe4213059f6dacf31f3bd1327b2cc0 Author: Ceri Davies <ceri@FreeBSD.org> AuthorDate: 2021-05-13 08:10:22 +0000 Commit: Gordon Bergling <gbe@FreeBSD.org> CommitDate: 2021-05-13 08:10:22 +0000 find(1): Document the -f option PR: 223127 Reported by: Mathieu Arnold <mat at FreeBSD dot org> Reviewed by: bcr, gbe MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D30215 usr.bin/find/find.1 | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3f5f4078b371b919f1a0d6096d91a7c103a23b7d commit 3f5f4078b371b919f1a0d6096d91a7c103a23b7d Author: Ceri Davies <ceri@FreeBSD.org> AuthorDate: 2021-05-13 08:10:22 +0000 Commit: Gordon Bergling <gbe@FreeBSD.org> CommitDate: 2021-05-16 08:36:53 +0000 find(1): Document the -f option PR: 223127 Reported by: Mathieu Arnold <mat at FreeBSD dot org> Reviewed by: bcr, gbe Differential Revision: https://reviews.freebsd.org/D30215 (cherry picked from commit 82483ea7adfe4213059f6dacf31f3bd1327b2cc0) usr.bin/find/find.1 | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
A commit in branch stable/12 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=ed5c8820f4786ddca97ef0411c133bccee2ddd85 commit ed5c8820f4786ddca97ef0411c133bccee2ddd85 Author: Ceri Davies <ceri@FreeBSD.org> AuthorDate: 2021-05-13 08:10:22 +0000 Commit: Gordon Bergling <gbe@FreeBSD.org> CommitDate: 2021-05-16 08:37:47 +0000 find(1): Document the -f option PR: 223127 Reported by: Mathieu Arnold <mat at FreeBSD dot org> Reviewed by: bcr, gbe Differential Revision: https://reviews.freebsd.org/D30215 (cherry picked from commit 82483ea7adfe4213059f6dacf31f3bd1327b2cc0) usr.bin/find/find.1 | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
Committed to stable/12 stable/13 and -CURRENT. Thanks for the patch and the PR.