HomeFreeBSD

find: implement -fprint and -fprint0

Description

find: implement -fprint and -fprint0

Implement -fprint fn which will print the matching files to fn, each
followed by a newline ('\n'). And -fprint0 (same, except followed by a
NUL). Both of these are always true. The file is created if it does not
exist, or truncated if it does. This is done first thing
unconditionally, so if there's no output, the file will have zero
length.

Note: GNU Find appears to collect the output for -fprint* to the same
file such that they don't interfere. That detail is unimplemented at
present.

Sponsored by: Netflix
Discussed with: jilles
Reviewed by: pauamma@gundo.com (man)
Differential Revision: https://reviews.freebsd.org/D42667

Details

Provenance
impAuthored on Jul 25 2025, 4:30 PM
Differential Revision
D42667: find: implement -fprint and -fprint0
Parents
rG7b9c912c41f4: find: Add GNU find's -printf
Branches
Unknown
Tags
Unknown