* find/defs.h (struct options): Add mount member and rename
stay_on_filesystem to xdev.
* find/ftsfind.c (find): Set FTS_MOUNT flag when -mount is enabled.
* find/parser.c (parse_table): Use a separate parser for -mount.
(parse_mount): Declare and define function.
(parse_xdev): Use xdev option flag.
* find/util.c (set_option_defaults): Initialize new struct members.
* doc/find.texi (node Filesystems): Add new section describing the new
behaviour of -mount and specify the current behaviour of -xdev.
* find/find.1: Document the new -mount behaviour and specify current
behaviour of -xdev.
* NEWS (Changes in find): Mention the -mount behaviour change.
Run 'make update-copyright'.
* lib/regexprops.c (copying): Update the year number manually.
* tests/sample-test: Adjust to use the single most recent year.
* All other files: Update copyright years via the above make run.
Use standard input instead of stdin, standard output instead of stdout,
and standard error instead of stderr in messages and documentation.
Inspired by coreutils commit:
https://cgit.git.sv.gnu.org/cgit/coreutils.git/commit/?id=c9a30d6781
* cfg.mk (sc_standard_outputs): Add syntax-check rule.
* doc/find.texi: Do the above.
* find/find.1: Likewise.
* locate/locate.1: Likewise.
* locate/locate.c: Likewise.
* xargs/xargs.1: Likewise.
* xargs/xargs.c: Likewise.
- Use -type f so that the timestamp of `subdir` is not relevant.
- Use LC_ALL=C with sort, tail, cut (as file names are not text).
- Use "$(...)" instead of just $(...).
Also mention that Issue 8 of the POSIX standard has been published
now.
* doc/find.texi (node Symbolic Links): s/directoires/directories/
* find/testsuite/find.gnu/execdir-hier.exp: Likewise here in a comment.
Copyright-paperwork-exempt: Yes
* doc/regexprops.texi: Regenerate due to recent changes in gnulib regex.h
to align with current Emacs behavior (gnulib commit efd5c380ff), and also
due to the change of the node sort order in regextype.c in the previous
commit.
Reported by Collin Funk in
https://lists.gnu.org/r/bug-gnulib/2025-07/msg00037.html
* find/find.1 (EXPRESSION): Add missing -print0 and -fprint0 to
the list of actions that suppress the default -print action.
Sort items.
* doc/find.texi (find Expressions): Likewise.
* NEWS: Mention the fix.
* doc/find.texi (Finding the Shallowest Instance): Add surrounding \(
and \) around the 3x -exec actions to correctly group them with higher
priority than the implicit '-a' for the following '-print'. Otherwise,
only the SCM roots matching the last test, "CVS", would be printed.
Improve indentation of the multi-line command.
Add sample output for clarity.
While at it, fix a minor typo.
This bug was present since adding that example in 2008.
The very same issue was already fixed for the man page in commit
v4.6.0-55-g47d8fd38.
Fixes https://sv.gnu.org/bugs/?62259
Run 'make update-copyright'.
* lib/regexprops.c (copying): Update the year number manually.
* tests/sample-test: Adjust to use the single most recent year.
* All other files: Update copyright years via the above make run.
The '{}' replacement done by the -execdir action prepends each entry,
i.e., the base names, with "./" unless for the root directory "/".
* doc/find.texi (-execdir): Document that behavior.
* find/find.1: Likewise.
Discussed at: https://sv.gnu.org/bugs/?66568
Copyright-paperwork-exempt: Yes
As the texinfo renderer is caring about proper layout, we can let sentences
start at the beginning of the line, thus making further changes easier
to review.
* doc/find.texi (-execdir): Break lines at the end of sentences.
* doc/find.texi (node Leaf Optimisation): s/filssytems/filesystems/
Bug introduced in v4.5.10-9-gb28cc8c4 in 2011.
Reported by <firasuke@gmail.com> in
https://savannah.gnu.org/bugs/?66418
A "+" only terminates -exec when it immediately follows an argument
which is exactly "{}" (and not, for example, "{}x"). This fixes
Savannah bug 66365.
* NEWS: explain this change.
* doc/find.texi: update one place which omitted the '{}' before '+'.
* find/parser.c (insert_exec_ok): consider + to be special ony if it
follows an argument which is exactly '{}'.
* tests/find/sv-bug-66365-exec.sh: test for this bug.
* tests/local.mk: add the new test file.
'make syntax-check' complains:
maint.mk: use "end-of-file", not "end of file"
make: *** [cfg.mk:273: sc_prohibit_unhyphenated_eof] Error 1
* doc/find.texi (xargs options): Change as suggested by the SC rule.
The forthcoming Issue 8 of the POSIX standard includes find -print0
and xargs -0.
* doc/find.texi: find -print0 is no longer GNU-specific. Similarly
for xargs -0.
* xargs/xargs.1: Likewise.
* NEWS: mention these changes.
While this is often described as a UK/US spelling difference, the
"-ise" spelling is described as a variant by the Oxford English
Dictionary. Therefore we prefer the "-ize" spelling.
* doc/find.texi: standardize on optimize.
* find/find.1: Likewise.
* find/parser.c: Likewise.
* find/pred.c: Likewise.
* find/tree.c: Likewise.
* NEWS: Likewise (except for historical entries).
The cost-based optimiser re-orders predicates based on their expected
cost. This re-ordering (as currently implemented) results in
user-visible changes to the order of operations. An optimiser should
not do that. For example, "-empty -readable" and "-readable -empty"
don't actually have the same effect since "-empty" fails on an
unreadable directory. This fixes savannah bug #58427 (unless the user
specifies -O2).
* find/util.c(set_option_defaults): set default optimisation level to
1 instead of 2.
* find/tree.c(build_expression_tree): call do_arm_swaps (i.e. apply
cost-based optimisations) only at optimisation level 2 and above.
* find/find.1(-O): explain this change.
* doc/find.texi(Optimisation Options): explain this change.
* NEWS: mention this change.
* find/pred.c (pred_xtype): if lstat fails with ELOOP, -xtype should
behave in the same way as -type.
(err_signals_broken_link): new function, true for ENOENT and ELOOP.
* doc/find.texi: document the fact that the "infinite loop" case is
handled like the "symbolic link target does not exist" case.
* find/find.1: Likewise.
* xargs/xargs.c: fix Savannah bug #64451 (xargs -P exits before all
children have exited if one exits with status 255).
* xargs/xargs.1 (BUGS): mention this bug and the corrected behaviour.
* doc/find.texi: Likewise.
* NEWS: mention this bugfix.
The @var{name} renders as NAME in Info, to this inconsistency is hard
to spot there. The inconsistency is easier to spot in the typeset
output (e.g. PDF, Postscript).
Our solution is to use @var{name} even inside @samp, since that
works (and is intended to, according to the documentation).
This fixes Savannah bug #65305.
* doc/Makefile.am (AM_MAKEINFOFLAGS): Add configuration variable
CHECK_NORMAL_MENU_STRUCTURE=1 to warn about inconsistent menu structure
again: makeinfo >=6.8 would not do this anymore.
* doc/find.texi (deffn Test -newerXY reference): Change lower-case
'b' to upper-case 'B' as only the latter is recognized in the code.
* NEWS (Documentation Changes): Document the fix.
Documentation bug introduced with commit f361af57cdb3 in 2007.
Fixes https://savannah.gnu.org/bugs/?65378
Run 'make update-copyright'.
* lib/regexprops.c (copying): Update the year number manually.
* tests/sample-test: Adjust to use the single most recent year.
* All other files: Update copyright years via the above make run.
* doc/find.texi (@node O_NOFOLLOW): Add a grep filter to 'find --version'
to only get the wanted "Features" line, thus avoiding to have a regular
Copyright line in the texi file. Previously, that place always had to
be reverted after 'make update-copyright'.
The description of the --replace/-i options of xargs in the Reference
chapter said that the replace-str would only be allowed to be omitted
for -i while this holds also true for the long option --replace.
A similar description of the same options in Interspersing File Names
was missing the '[]' to mark the REPLACE-STR as optional for -i.
* doc/find.texi (xargs options): Document that omitting the REPLACE-STR
is allowed for --replace, too. Further align the description with
that in ...
(Interspersing File Names): ... here. Mark the replace-str as optional
for -i by surrounding with '[]'.
* doc/find.texi: Change the deprecated -l option to -L 1 in various
xargs(1) examples.
* NEWS (Documentation Changes): Document the change.
Reported by Sebastian Carlos in
Fixes https://savannah.gnu.org/bugs/?64480
* doc/find.texi (node xargs options): Add description of the "--"
option delimiter.
* xargs/xargs.1 (OPTIONS): Likewise.
* NEWS (Documentation Changes): Document the change.
Suggested by Dan Jacobson <jidanni@jidanni.org> in
<https://lists.gnu.org/r/bug-findutils/2023-04/msg00009.html>
The previous entry point for 'info find' was "Invoking find" which
is not that enlightening for the user. Change to the better choice.
* doc/find.texi (@direntry): Change target for 'find' to the
chapter "Finding Files".
Discussed at:
<https://lists.gnu.org/r/bug-findutils/2023-04/msg00006.html>
* cfg.mk (sc_prohibit_unhyphenated_eof): Add syntax-check rule.
* doc/find.texi: Change "end of file" to "end-of-file" in several places.
* xargs/xargs.1: Likewise.
* xargs/xargs.c (eof_str): Change comment to adhere to the new rule.
* doc/find.texi (Multiple Files): Clarify better that xargs will stop when
reading the EOF marker string specified with the --eof option, or when a
launched command exists with status 255. Switch the two termination
conditions to reflect the behavior.
Fixes RT #1912852.
Run 'make update-copyright'.
* lib/regexprops.c (copying): Update the year number manually.
* tests/sample-test: Adjust to use the single most recent year.
* All other files: Update copyright years via the above make run.