Bug 223127

Summary: find(1) does not explain what "-f" option does
Product: Documentation Reporter: Mathieu Arnold <mat>
Component: Manual PagesAssignee: Gordon Bergling <gbe>
Status: Closed FIXED    
Severity: Affects Some People CC: ceri, doc, gbe, tavianator, ygy
Priority: --- Keywords: needs-qa, patch
Version: Latest   
Hardware: Any   
OS: Any   
See Also: https://reviews.freebsd.org/D30215
Attachments:
Description Flags
manpage patch none

Description Mathieu Arnold freebsd_committer freebsd_triage 2017-10-20 12:43:42 UTC
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.)
Comment 1 Tavian Barnes 2018-11-15 01:03:30 UTC
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.
Comment 2 Ceri Davies 2021-04-14 15:42:57 UTC
Created attachment 224108 [details]
manpage patch

Patch attached.
Comment 3 Gordon Bergling freebsd_committer freebsd_triage 2021-05-11 15:09:22 UTC
@Ceri Davies, thanks for the patch, I created a differential for it.
Comment 4 commit-hook freebsd_committer freebsd_triage 2021-05-13 08:14:01 UTC
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(-)
Comment 5 commit-hook freebsd_committer freebsd_triage 2021-05-16 08:38:13 UTC
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(-)
Comment 6 commit-hook freebsd_committer freebsd_triage 2021-05-16 08:38:14 UTC
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(-)
Comment 7 Gordon Bergling freebsd_committer freebsd_triage 2021-05-16 08:39:54 UTC
Committed to stable/12 stable/13 and -CURRENT. Thanks for the patch and the PR.