259 Commits

Author SHA1 Message Date
James Youngman
72e9e595cc Clearly explain the result of -exec/-execdir ... +
* doc/find.texi (Single File): Explain that "-exec command ;"
returns true of the command exited with a status of 0.
(Multiple Files): Explain that "-execdir command +" always returns
true.  Likewise for "-exec command +".
* find/find.1: similar changes.
2013-10-26 14:56:17 +01:00
James Youngman
6cd5d3b1a8 find: state that -execdir command is run locally to the matched file.
* doc/find.texi (Single File): Correct the description of what the
current directory will be when the command specified by -execdir
gets run.  This fixes a documentation but reported by Eric
Hanchrow.
* NEWS: Mention this fix.
2013-09-21 23:45:08 +01:00
Paul Eggert
90f0c5d241 Remove support for obsolete -perm +MODE syntax.
Also, do not reject -perm /MODE merely because of POSIXLY_CORRECT.
Problem reported in <https://savannah.gnu.org/bugs/?38474>.
* NEWS:
* doc/find.texi (Mode Bits): Document this.
(Environment Variables): POSIXLY_CORRECT does not affect -perm.
* find/parser.c (parse_help): Mention /MODE, not +MODE.
(non_posix_mode): Remove.
(parse_perm): Remove support for -perm +MODE.
Do not reject -perm /MODE merely because POSIXLY_CORRECT is set;
POSIXLY_CORRECT is not supposed to be for pedantic checking.
2013-04-22 22:18:15 +01:00
James Youngman
2957a7ae55 Fix documentation typo.
* doc/find.texi (Mode Bits): Fix typo "it set" -> "is set".
2013-04-22 21:49:40 +01:00
Paul Eggert
a8981eb058 doc: fix typos uncovered by texinfo 5.0
* doc/find-maint.texi: Fix typos that cause 'make' to fail
if texinfo 5.0 is installed.
2013-04-22 21:30:52 +01:00
James Youngman
40e255e6c0 Add example for find -printf.
* doc/find.texi (Print File Information): Add an example for "find
-printf" suggested by Karl Berry.
2013-04-21 18:50:09 +01:00
James Youngman
95ba1e2c60 Further documentation improvements.
* doc/find.texi: use @code for environment variable names, and
other improvements.
2013-04-21 18:36:04 +01:00
Peter Breitenlohner
a1795dfc82 Remove duplicate paragraph in texinfo
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2013-04-20 15:44:48 +01:00
James Youngman
fdaa57adba Document that -0/-d turns off logical end-of-file processing.
* doc/find.texi (xargs options): Explain that the logical end of
file marker string set with -E is not special if -d or -0 was
specified.
* xargs/xargs.c (usage): Mention this in the --help output.
(read_string): Correct the function header comment to point out
that there is no logical end-of-file processing for this case.
Also point out that the delimiter may not always be NUL.
This documentation update fixes Savannah bug #36652.
(main): Emit a warning message if -0/-d is specified and -E was
also used.
* xargs/testsuite/xargs.gnu/E_-0.exp: Don't compare stderr output,
since for this case xargs now emits a warning message.
* NEWS: Mention this change.
2013-03-29 16:39:01 +00:00
James Youngman
842a39c81b Expand on warning about xargs -P and stdout, including in Info.
* xargs/xargs.1: Expand on the warning about sharing stdout for
"xargs -P".
* doc/find.texi (Controlling Parallelism): Add a suitable warning
about sharing resources here, too.
* NEWS: Mention that all relevant documentation was updated with
this warning.
2013-03-24 23:14:06 +00:00
James Youngman
728989bd7d Make the manual section ordering and menu item ordering consistent.
* doc/find.texi (Top): Re-order menu items to be consistent with
ordering of sections ('Reference' is moved).
(Print File Information): Add missing menu item 'Formatting Flags'
and remove that menu item from inside 'Format Directives'.
(Formatting Flags): Hence this is a subsection, not a
subsubsection.
2012-12-19 00:50:34 +00:00
Dmitry V. Levin
bf5f83afdf find: use FTS_VERBATIM (and update gnulib)
The recent change v0.0-7611-g3a9002d in gnulib that made fts_open strip
trailing slashes from input path names had a negative impact on
findutils that relies on the old fts_open behavior to implement POSIX
requirement that each path operand of the find utility shall be
evaluated unaltered as it was provided, including all trailing slash
characters.

A new bit flag FTS_VERBATIM was added later as the option to disable
that stripping when it is not desirable.

* gnulib: update to latest, to get FTS_VERBATIM support.
* find/ftsfind.c (ftsoptions): Set the FTS_VERBATIM bit.

As a result of the gnulib update, re-generate doc/regexprops.texi.

* doc/regexprops.texi: re-generate to describe the changes to
gnulib for the regular expression types "awk" (to add character
class support), "gnu-awk" (to add range support) and "posix-awk"
(also to add range suport).
* NEWS: Describe this change.
2012-12-15 14:25:33 +00:00
Jim Meyering
003c8e6e37 fix comment/changelog typos
First, change "cant" to "can't" manually in m4/nullsort.m4,
since "cant" had 3 replacement options.  Then remove "dum"
from the LocalWords lists in doc/*.texi.  It was not used.
Finally, perform the remaining changes mechanically using
http://github.com/lyda/misspell-check and
some perl to massage its diagnostics into sed -i commands:

git ls-files|grep -v '\.po$'|misspellings -f -|perl -nl \
  -e '/^(.*?)\[(\d+)\]: (\w+) -> "(.*?)"$/ or next;' \
  -e '($file,$n,$l,$r)=($1,$2,$3,$4); $q="'\''"; $r=~s/$q/$q\\$q$q/g;'\
  -e 'print "sed -i $q${n}s!$l!$r!$q $file"'|bash
2012-06-05 10:00:50 +01:00
Karl Berry
56a172df50 Documentation improvements (UK spelling, use of @code).
* find.texi (@copying): add 2011, period outside quotes.
(thoughout): use UK spelling and " -- " convention.
(section names): use @code where needed.
2011-12-30 12:16:09 +00:00
Jim Meyering
c4f17ed458 Fix a typo in find.texi.
* doc/find.texi (Error Messages From find): Fix typo s/an/a/.
2011-09-11 15:52:18 +01:00
James Youngman
9cb1805e61 Reserve format specifiers %(, %{ and %[ for future use.
* find/print.c (insert_fprintf): Reject %(, %{ and %[.
(make_segment): Remove code which previously supposedly rejected
these format specifiers, but in fact did nothing.   Replace with
an assertion to document the fact that we do not expect to see
these format characters in make_segment.
* find/testsuite/find.gnu/printf-reserved.exp: New test case, for
%(, %{ and %[, which are all rejected.
* find/testsuite/Makefile.am (EXTRA_DIST_EXP): Add
find.gnu/printf-reserved.exp.
* doc/find.texi (Reserved and Unkown Directives): Document this.
* find/find.1: Document this.
* NEWS: Mention this change.
2011-06-19 11:49:34 +01:00
James Youngman
add5d62b74 Enable the sc_texinfo_acronym check
* cfg.mk: Enable the sc_texinfo_acronym check.  Exempt
doc/perm.text, which isn't ours anyway.
* doc/find.texi (Deleting Files): Say just POSIX rather than
@acronym{POSIX}, simply because this is the convention in GNU
documentation.  The motivation is that it's hard to do so
consistently (because, for example, you can't use @acronym in a
node name).
2011-06-12 02:44:21 +01:00
James Youngman
f96e8cd58a Avoid some false positives for the sc_prohibit_doubled_word check.
* .x-sc_prohibit_doubled_word: don't perform this check on
xargs/testsuite/xargs.sysv/iquotes.xo or ChangeLog.
Don't check .po files for doubled English words (because they're
not in English).
* find/tree.c: Modify some text to avoid saying "AND and",
which one of the syntax checks doesn't like.
(opt_expr): Likewise.
(consider_arm_swap): Likewise.
* README: Likewise.
2011-06-05 22:09:02 +01:00
James Youngman
411fbef03b Update xargs error message.
* doc/find.texi (Error Messages From xargs): the message "can not
fit single argument within argument list size limit" is now
"argument list too long".
2011-06-05 01:10:37 +01:00
James Youngman
5c9fa623a4 Update the copyright year in test/documentation files, updatedb.
* build-aux/src-sniff.py: Update copyright year.
* doc/find-maint.texi: Update copyright year.
* doc/regexprops.texi: Update copyright year.
* find/testsuite/config/unix.exp: Update copyright year.
* locate/testsuite/config/unix.exp: Update copyright year.
* xargs/testsuite/config/unix.exp: Update copyright year.
* locate/updatedb.sh: Update copyright year.
2011-06-04 13:08:49 +01:00
James Youngman
804ff7b90e Don't assume that "echo" lives in /bin.
* xargs/xargs.c (main): Change default_cmd from "/bin/echo" (which
may not be present on some POSIX systems) to "echo" (which must
exist somewhere on $PATH on any POSIX system).
* doc/find.texi (Multiple Files): document this.
* NEWS: Describe this change.
* xargs/testsuite/xargs.sysv/empty_def-t.xe: Change /bin/echo to
echo.
* xargs/testsuite/xargs.gnu/n2-s26-x-0.exp: Change -s26 to -s21 to
keep the expected test result the same.  Rename the test to
reflect the updated arguments.
* xargs/testsuite/xargs.gnu/n2-s26-x-0.xo: Rename to
n2-s21-x-0.xo.
* xargs/testsuite/xargs.gnu/n2-s26-0.exp: Rename to n2-s21-0.exp,
update -s argument.
* xargs/testsuite/xargs.posix/s30.exp: Rename to s25.exp, update -s.
* xargs/testsuite/xargs.posix/s30.xo: Rename to s25.xo.
* xargs/testsuite/xargs.gnu/s30-0.exp: Rename to s25-0.exp, update
-s argument.
* xargs/testsuite/xargs.gnu/s30-0.xo: Rename to s25-0.xo.
* xargs/testsuite/xargs.sysv/s30-t.exp: Rename to s25-t.exp,
update -s.
* xargs/testsuite/xargs.sysv/s30-t.xo: Rename to s25-t.xo.
* xargs/testsuite/xargs.sysv/s30-t.xe: Rename to s25-t.xe, change
/bin/echo to just echo.
* xargs/testsuite/xargs.posix/s47.exp: Rename to s42.exp, update -s.
* xargs/testsuite/xargs.posix/s47.xo: Rename to s42.xo.
* xargs/testsuite/xargs.gnu/n3-s36-0.exp: Rename to n3-s31-0.exp,
update -s.
* xargs/testsuite/xargs.gnu/n3-s36-0.xo: Rename to n3-s31-0.xo.
* xargs/testsuite/xargs.gnu/s20-0.exp: Rename to s15-0.exp, update
-s.
* xargs/testsuite/xargs.gnu/s20-0.xo: Rename to s15-0.xo.
* xargs/testsuite/xargs.posix/n2-s26.exp: Rename to n2-s21.exp,
update -s.
* xargs/testsuite/xargs.posix/n2-s26.xo: Rename to n2-s21.xo.
* xargs/testsuite/xargs.gnu/s19-0.exp: Rename to s14-0.exp, update
-s.
* xargs/testsuite/xargs.gnu/s19-0.xo: Rename to s14-0.xo.
* xargs/testsuite/xargs.gnu/s19_2-0.exp: Rename to s14_2-0.exp,
update -s.
* xargs/testsuite/xargs.gnu/s19_2-0.xo: Rename to s14_2-0.xo.
* xargs/testsuite/xargs.posix/n3-s36.exp: Rename to n3-s31.exp,
update -s.
* xargs/testsuite/xargs.posix/n3-s36.xo: Rename to n3-s31.xo.
* xargs/testsuite/xargs.posix/s19.exp: Rename to s14.exp, update
-s.
* xargs/testsuite/xargs.posix/s19.xo: Rename to s14.xo.
* xargs/testsuite/xargs.posix/s19_2.exp: Rename to s14_2.exp,
update -s.
* xargs/testsuite/xargs.posix/s19_2.xo: Rename to s14_2.xo.
* xargs/testsuite/xargs.posix/s20.exp: Rename to s15.exp,
update -s.
* xargs/testsuite/xargs.posix/s20.xo: Rename to s15.xo.
* xargs/testsuite/Makefile.am (EXTRA_DIST_XO): Update names.
(EXTRA_DIST_EXP): Likewise.
2011-05-24 00:33:38 +01:00
James Youngman
b28cc8c493 Document ftsfind/oldfind and configure options.
* doc/find.texi (Configuration): New section documenting the
important configuration options that can be passed to configure,
including --without-fts.
* find/find.1 (BINARIES): New section explaining why two binaries
are installed.
* find/oldfind.1: New manual page explaining how 'oldfind' is
different to 'find'.
* find/ftsfind.1: New manual page explaining how 'ftsfind' is
different to 'find'.
* find/Makefile.am (man_MANS): As well as find.1, install one of
ftsfind.1 or oldfind.1, depending on whether --without-fts was
specified to configure.
* NEWS: Mention this change.
2011-05-17 10:48:57 +01:00
James Youngman
6f7b74d052 Implement xargs --process-slot-var.
* xargs/xargs.c (set_slot_var): New function; sets an environment
variable to the index of the entry in pids[] that represents the
relevant child process.  This can be used in rudimentary load
distribution systems.
(slot_var_name): the name of the variable to use (selected by
--process-slot-var).
(enum LongOptionIdentifier): Unique identifiers for long options
with no short option equivalent (--process-slot-var is the first).
(longopts): Add --process-slot-var.
(add_proc): return the index within pids[] that we selected.
(main): Pass &option_index to getopt_long (option_index is a new
variable) in order to identify which long option was passed.
Handle --process-slot-var.
(prep_child_for_exec): Call set_slot_var.
(usage): Mention --process-slot-var.
* doc/find.texi (xargs options): Document --process-slot-var.
* xargs/xargs.1: Likewise.
* NEWS: Mention this change.

Signed-off-by: James Youngman <jay@gnu.org>
2011-05-15 18:23:24 +01:00
James Youngman
15fea458f3 Update gnulib and use parse-datetime instead of the obsolete module getdate.
* import-gnulib.config (modules): Import the gnulib module
parse-datetime instead of the obsolete module getdate.
(gnulib_version): Update to the current version of gnulib.
* find/parser.c: Include parse-datetime.h instead of getdate.h.
* doc/find.texi: Include parse-datetime.texi instead of
getdate.texi.
* doc/Makefile.am (find_TEXINFOS): Use parse-datetime.texi instead
of getdate.texi.
* configure.ac: Update to gettext 0.18.1.
* po/Rules-quot: Update this file from gettext.
2011-04-02 17:02:23 +01:00
James Youngman
9f1ee0e466 Fix Savannah bug #31359: FAIL: test-strstr on alpha.
* import-gnulib.config (gnulib_version): Update the version of
gnulib.
* NEWS: Mention this bugfix.
2010-10-21 10:54:49 +01:00
James Youngman
c890c60305 Give some references to further reading on security.
* doc/find.texi (Further Reading on Security): Give some
references to further reading on security.
* NEWS: Mention this change.
2010-10-11 10:38:29 +01:00
John Gilmore
43bc475fe6 xargs: patch for varying parallelism
Increase/decrease parallelism with SIGUSR1 and SIGUSR2.

Signed-off-by: James Youngman <jay@gnu.org>
2010-05-09 19:48:24 +01:00
James Youngman
62998cd84b Re-add trailing blank to make the check-regexprops check pass 2010-04-12 23:22:23 +01:00
James Youngman
daff367499 Remove trailing blank lines.
* .x-sc_prohibit_empty_lines_at_EOF: Add list of exceptions to the
no-blank-lines-at-EOF syntax check.
* doc/regexprops.texi: Remove empty lines at the end of the file.
* find/finddata.c: Likewise.
* find/fstype.c: Likewise.
* find/testsuite/excuses.txt: Likewise.
* find/testsuite/find.gnu/access.exp: Likewise.
* find/testsuite/find.gnu/exec-one-rtn-fail.exp: Likewise.
* find/testsuite/find.gnu/posix-perminvalid.exp: Likewise.
* find/testsuite/find.gnu/samefile-missing.exp: Likewise.
* find/testsuite/find.gnu/samefile-p-brokenlink.exp: Likewise.
* find/testsuite/find.gnu/sv-bug-17490.exp: Likewise.
* find/testsuite/find.gnu/sv-bug-18222.exp: Likewise.
* find/testsuite/find.posix/bracket-depth.exp: Likewise.
* find/testsuite/find.posix/empty-parens.exp: Likewise.
* find/testsuite/find.posix/files-not-expressions1.exp: Likewise.
* find/testsuite/find.posix/files-not-expressions2.exp: Likewise.
* find/testsuite/find.posix/files-not-expressions3.exp: Likewise.
* find/testsuite/find.posix/group-empty.exp: Likewise.
* find/testsuite/find.posix/user-empty.exp: Likewise.
* find/testsuite/find.posix/user-missing.exp: Likewise.
* lib/extendbuf.c: Likewise.
* lib/fdleak.c: Likewise.
* lib/fdleak.h: Likewise.
* lib/findutils-version.h: Likewise.
* lib/gnulib-version.h: Likewise.
* lib/printquoted.c: Likewise.
* lib/regextype.c: Likewise.
* lib/safe-atoi.c: Likewise.
* locate/testsuite/config/unix.exp: Likewise.
* locate/testsuite/locate.gnu/exists1.exp: Likewise.
* locate/testsuite/locate.gnu/exists2.exp: Likewise.
* locate/testsuite/locate.gnu/exists3.exp: Likewise.
* locate/testsuite/locate.gnu/ignore_case1.exp: Likewise.
* locate/testsuite/locate.gnu/ignore_case2.exp: Likewise.
* locate/testsuite/locate.gnu/ignore_case3.exp: Likewise.
* locate/testsuite/locate.gnu/notexists1.exp: Likewise.
* locate/testsuite/locate.gnu/notexists2.exp: Likewise.
* locate/testsuite/locate.gnu/notexists3.exp: Likewise.
* locate/testsuite/locate.gnu/sv-bug-14535.exp: Likewise.
* m4/Makefile.am: Likewise.
* m4/nullsort.m4: Likewise.
* xargs/testsuite/xargs.posix/arg_max_32bit_linux_bug.exp: Likewise.
* xargs/testsuite/xargs.posix/arg_max_64bit_linux_bug.exp: Likewise.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-11 15:57:16 +01:00
James Youngman
8562386a11 Update the maintenance manual.
* doc/find-maint.texi: Update the maintenance manual to take into
account the fact that we uniformly use git rather than CVS.  Point
out the new version tag format.  Mention "make coverage".
README-CVS is now called README-hacking.  Update the URL for the
Translation Project.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-07 21:46:44 +01:00
James Youngman
7ad98986ff Avoid using magic numbers as exit statuses.
Avoid using magic numbers as exit statuses.
* cfg.mk (skip_defer): Enable sc_prohibit_magic_number_exit.
* doc/find-maint.texi (Security): Avoid error (1, ...) in the
example patch.
* find/find.c (main): Use exit status EXIT_FAILURE instead of 1.
(wd_sanity_check): Likewise.
(safely_chdir_lstat): Likewise.
(process_dir): Likewise.
* find/fstype.c (must_read_fs_list): Likewise.
* find/ftsfind.c (main): Likewise.
(main): Likewise.
* find/parser.c (check_option_combinations): Use exit status
EXIT_FAILURE instead of 1.
(parse_group): Likewise.
(parse_help): Use exit status EXIT_SUCCESS instead of 0.
(parse_version): Likewise.
(fnmatch_sanitycheck): Use exit status EXIT_FAILURE instead of 1.
(insert_depthspec): Likewise.
(parse_newerXY): Likewise.
(non_posix_mode): Likewise.
(parse_perm): Likewise.
(insert_regex): Likewise.
(parse_size): Likewise.
(parse_show_control_chars): Likewise.
(parse_used): Likewise.
(parse_user): Likewise.
(parse_context): Likewise.
(insert_type): Likewise.
(insert_fprintf): Likewise.
(make_segment): Likewise.
(check_path_safety): Likewise.
(new_insert_exec_ok): Likewise.
(get_relative_timestamp): Likewise.
(parse_time): Likewise.
* find/tree.c (get_expr): Use exit status EXIT_FAILURE instead of 1.
(scan_rest): Likewise.
(get_pred_cost): Likewise.
(get_pred_cost): Likewise.
(build_expression_tree): Likewise.
(get_new_pred_chk_op): Likewise.
* find/pred.c (launch): Use exit status EXIT_FAILURE instead of 1.
* find/util.c (process_debug_options): Use exit status
EXIT_SUCCESS instead of 0.
(process_optimisation_option): Use exit status EXIT_FAILURE
instead of 1.
(set_option_defaults): Likewise.
* lib/buildcmd.c (exceeds): Likewise.
(bc_do_exec): Likewise.
(bc_push_arg): Likewise.
* lib/nextelem.c: Remove test code.
* lib/safe-atoi.c (safe_atoi): Use exit status EXIT_FAILURE
instead of 1.
* lib/regextype.c (get_regex_type): Use exit status EXIT_FAILURE
instead of 1.  Include <stdlib.h>, for EXIT_FAILURE.
* locate/locate.c (set_max_db_age): Use exit status EXIT_FAILURE
instead of 1.
(set_max_db_age): Likewise.
(toolong): Likewise.
(visit_locate02_format): Likewise.
(search_one_database): Likewise.
(drop_privs): Likewise.
* locate/frcode.c (get_seclevel): Use exit status EXIT_FAILURE
instead of 1.
(outerr): Likewise.
(main): Likewise.
* locate/code.c (inerr): Use exit status EXIT_FAILURE instead of
1.
(outerr): Likewise.
* locate/word_io.c (getword): Use exit status EXIT_FAILURE instead of 1.

Use named constants for xargs exit codes.
* xargs/xargs.c (child_error): Use EXIT_SUCCESS instead of 0.
(enum XargsStatusValues): introduce named constants for the
various things that cause speicific exit codes.
(enum  ClientStatusValues): Also introduce named constants for the
child's exit status.
(get_char_oct_or_hex_escape): Use EXIT_FAILURE instead of 1.
(get_input_delimiter): Likewise.
(main): Likewise.
(read_line): Likewise.
(read_string): Likewise.
(print_args): Likewise.
(xargs_do_exec): Likewise.
(wait_for_proc): Likewise.
(wait_for_proc): Use enum XargsStatusValues for exit codes.
(parse_num): Use EXIT_FAILURE instead of 1.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-03 10:08:11 +01:00
James Youngman
aca33f8515 Avoid false positives for the sc_prohibit_test_minus_ao syntax check.
* doc/find.texi (Updating A Timestamp File): Work around a syntax
check designed to prevent the use of "test X -a Y".
* find/find.1: Likewise.

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-03 10:07:30 +01:00
James Youngman
8d81d17769 Various coding standard fixes.
* lib/regextype.c: Don't use HAVE_CONFIG_H.
* doc/find-maint.texi: Remove RCS keywords (they were in an
example security vulnerability announcement).

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-03 10:07:29 +01:00
James Youngman
bb48cc21d8 Regenerate doc/regexprops.texi
Signed-off-by: James Youngman <jay@gnu.org>
2010-04-02 21:16:21 +01:00
James Youngman
7bb738db58 Switch from GNU Free Documentation License 1.2 to 1.3.
* NEWS: Update GFDL version.
* README-hacking: Likewise.
* doc/find-maint.texi: Likewise.
* lib/regexprops.c: Likewise (though the license being changed is the
license for the output).

Signed-off-by: James Youngman <jay@gnu.org>
2010-04-02 21:16:21 +01:00
James Youngman
7c94e22158 Update copyright years
Signed-off-by: James Youngman <jay@gnu.org>
2010-04-02 01:46:32 +01:00
James Youngman
cbdfd2d86f Optimise -fstype NOTUSED to -false at -O2.
Optimise -fstype NOTUSED to -false at -O2.
* find/parser.c: Include mountlist.h.
(insert_false): New function, inserts a -false predicate.
(parse_false): Use insert_false.
(is_used_fs_type): New function, determines if any mounted
filesystem is of the named type.
(parse_fstype): At optimisation level 2 and above, -fstpe FOO
is converted to -false if no mounted filesytem is of type FOO.
* find/find.1: Document this optimisation.
* doc/find.texi (Optimisation Options): Likewise.
* NEWS: Mention this change.
2010-04-01 21:30:54 +01:00
Kamil Dudka
1a05af6a0f find: add SELinux support
* find/defs.h: Add SELinux related definitions.
* find/tree.c: Add -context predicate to lookup.
* find/pred.c: Handle %Z printf directive.
* find/parser.c: Parse -context predicate and %Z printf directive.
* find/find.1: Mention -context predicate and %Z printf directive.
* doc/find.texi: Mention -context predicate and %Z printf directive.
* find/Makefile.am: Add SELinux libraries.
* import-gnulib.config: Require module selinux-at and the corresponding
version of gnulib.

Signed-off-by: Kamil Dudka <kdudka@redhat.com>
2010-03-30 10:11:30 +01:00
James Youngman
d4f2e4453e Explain the problems with "-name a/b" and "-path foo/".
* find/find.1 (-iname): We already refer to -name, so duplicate
less text.
(-name): Explain that -name a/b will never match anything.
* doc/find.texi (Base Name Patterns): Explain that -name a/b will
never match anything.
(Full Name Patterns): Fix typo.

Signed-off-by: James Youngman <jay@gnu.org>
2010-02-25 11:06:53 +00:00
James Youngman
61f9b1c1cf Fix Savannah bug#28872, Mistake in "Problems with -exec and filenames"
* doc/find.texi (Problems with -exec and filenames): Add missing
$0 argument in example for sh -c 'something "$@" sh ...
* NEWS: Mention this change.

Signed-off-by: James Youngman <jay@gnu.org>
2010-02-20 19:54:35 +00:00
James Youngman
9986eefc62 Savannah bug #23920: warn about -path arguments ending in /.
Savannah bug #23920: warn about -path arguments ending in /.
* find/parser.c (insert_path_check): new function; abstracts the
common functionality of parse_path, parse_ipath, parse_wholename,
parse_iwholename.  Also check for a trailing slash and warn about
it (unless $POSIXLY_CORRECT is set).  Don't warn if the pattern
also happens to be a start_point, because those could be matched.
(parse_path, parse_ipath, parse_wholename, parse_iwholename): Use
insert_path_check.
* find/tree.c (is_start_point): new function; returns true if the
indidated string matches a start point.
(num_start_points, start_points): new variables, storing the
starting points listed on the command line.
(build_expression_tree): Set num_start_points and start_points.
* find/defs.h: Declare is_start_point.
* doc/find.texi (Full Name Patterns): Explain that candidate names
for -path, -regex etc. will never end in a slash, so "-path /tmp/"
will never match anything.
* find/find.1: Likewise.
2009-07-14 23:30:55 +01:00
Andreas Metzler
9f499c6664 * doc/find.texi: Various typo fixes.
Signed-off-by: James Youngman <jay@gnu.org>
2009-07-06 22:55:42 +01:00
James Youngman
1a55d99010 Fix typo in -execdir documentation.
* doc/find.texi (Single File): Typo correction; we're describing
-execdir, not -exec.
2009-07-06 00:02:59 +01:00
James Youngman
3b5121584a Create regexprops.texi in $(srcdir), in order to avoid problems with
"make distcheck".
2009-07-05 18:13:42 +01:00
James Youngman
7d2abda8d4 Move regexprops.texi into git and check the autogenerated version is the same.
* lib/check-regexprops.sh: New test.  Run regexprops as a check,
and compare its output against the contents of doc/regexprops.texi.
If there is a mismatch for regexprops.texi, save the correct version.
* lib/Makefile.am: Run check-regexprops.sh for 'make check'.
* doc/Makefile.am: don't clean regexprops.texi, and don't generate
it automatically.
* doc/regexprops.texi: add into source control.
it automatically.
* doc/.gitignore: don't ignore regexprops.texi
2009-07-05 14:26:22 +01:00
Andreas Metzler
0ca97dffca Correct a typo "diagnositcs".
* doc/find.texi (Environment Variables): Correct a typo.

Signed-off-by: James Youngman <jay@gnu.org>
2009-04-25 09:26:52 +01:00
James Youngman
6ba6fbaa96 Enabled GCC warnings for declarations after statements.
Enabled GCC warnings for declarations after statements.
* import-gnulib.config: Import the gnulib module 'warnings'
* configure.ac: Add GCC warning -Wdeclaration-after-statement.
* Makefile.am: Add AM_CFLAGS and set it to $(WARN_CFLAGS).
* find/Makefile.am, doc/Makefile.am, lib/Makefile.am: Likewise.
* locate/Makefile.am, xargs/Makefile.am: Likewise.

Signed-off-by: James Youngman <jay@gnu.org>
2009-03-04 11:07:50 +00:00
James Youngman
5dce9f443c Removed trailing whitespace.
Removed trailing whitespace.
* Makefile.am: Removed trailing white space.
* NEWS, build-aux/check-testfiles.sh, build-aux/src-sniff.py,
doc/Makefile.am, doc/find-maint.texi, doc/find.texi, find/Makefile.am,
find/defs.h, find/find.1, find/find.c, find/finddata.c, find/fstype.c,
find/ftsfind.c, find/parser.c, find/pred.c, find/tree.c, find/util.c,
import-gnulib.sh, lib/Makefile.am, lib/buildcmd.c, lib/buildcmd.h,
lib/dircallback.c, lib/dircallback.h, lib/extendbuf.c,
lib/extendbuf.h, lib/findutils-version.c, lib/findutils-version.h,
lib/forcefindlib.c, lib/gnulib-version.h, lib/listfile.c,
lib/modetype.h, lib/nextelem.c, lib/nextelem.h, lib/printquoted.c,
lib/printquoted.h, lib/qmark.c, lib/regexprops.c, lib/regextype.c,
lib/savedirinfo.c, lib/savedirinfo.h, lib/strspn.c, lib/wait.h,
lib/waitpid.c, locate/bigram.c, locate/code.c, locate/locate.1,
locate/locate.c, locate/locatedb.5, locate/locatedb.h,
locate/updatedb.1, locate/updatedb.sh, locate/word_io.c,
m4/findlib.m4, m4/nullsort.m4, m4/withfts.m4, xargs/xargs.1: Likewise.

Signed-off-by: James Youngman <jay@gnu.org>
2009-03-04 10:49:59 +00:00
James Youngman
60f59fddaa Applied doc patch from RB <aoz.syn@gmail.com> explaining how to find the shallowest instance of in a tree 2008-06-20 23:04:13 +00:00
James Youngman
79db8d1b90 Applied tiny change from Per Starbäck <starback@stp.lingfil.uu.se>: directory separator is slash, not backslash 2008-06-19 09:12:52 +00:00