Home Explore Blog CI



man-pages

27th chunk of `find.man`
30d631988a15e183b4d576b706c32442a77c8026131cc4860000000100000ed9
           4.3.0
       -regextype             4.2.24
       -exec ... +            4.2.12     POSIX
       -execdir               4.2.12     BSD
       -okdir                 4.2.12
       -samefile              4.2.11
       -H                     4.2.5      POSIX
       -L                     4.2.5      POSIX
       -P                     4.2.5      BSD
       -delete                4.2.3
       -quit                  4.2.3
       -d                     4.2.3      BSD
       -wholename             4.2.0
       -iwholename            4.2.0
       -ignore_readdir_race   4.2.0
       -fls                   4.0
       -ilname                3.8
       -iname                 3.8
       -ipath                 3.8
       -iregex                3.8

       The syntax -perm +MODE was removed in findutils‐4.5.12, in favour of -perm /MODE.  The +MODE syntax had been deprecated since findutils‐4.2.21 which was released in 2005.

NON‐BUGS
   Operator precedence surprises
       The  command find . -name afile -o -name bfile -print will never print afile because this is actually equivalent to find . -name afile -o \( -name bfile -a -print \).  Remember that the precedence of -a is higher than
       that of -o and when there is no operator specified between tests, -a is assumed.

   “paths must precede expression” error message
       $ find . -name *.c -print
       find: paths must precede expression
       find: possible unquoted pattern after predicate ‘‐name’?

       This happens when the shell could expand the pattern *.c to more than one file name existing in the current directory, and passing the resulting file names in the command line to find like this:
       find . -name frcode.c locate.c word_io.c -print
       That command is of course not going to work, because the -name predicate allows exactly only one pattern as argument.  Instead of doing things this way, you should enclose the pattern in quotes or escape the wildcard,
       thus allowing find to use the pattern with the wildcard during the search for file name matching instead of file names expanded by the parent shell:
       $ find . -name '*.c' -print
       $ find . -name \*.c -print

BUGS
       There are security problems inherent in the behaviour that the POSIX standard specifies for find, which therefore cannot be fixed.  For example, the -exec action is inherently insecure, and -execdir should be used in‐
       stead.

       The environment variable LC_COLLATE has no effect on the -ok action.

REPORTING BUGS
       GNU findutils online help: <https://www.gnu.org/software/findutils/#get‐help>
       Report any translation bugs to <https://translationproject.org/team/>

       Report any other issue via the form at the GNU Savannah bug tracker:
              <https://savannah.gnu.org/bugs/?group=findutils>
       General topics about the GNU findutils package are discussed at the bug-findutils mailing list:
              <https://lists.gnu.org/mailman/listinfo/bug‐findutils>

COPYRIGHT
       Copyright © 1990‐2022 Free Software Foundation, Inc.  License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
       This is free software: you are free to change and redistribute it.  There is NO WARRANTY, to the extent permitted by law.

SEE ALSO
       chmod(1), locate(1), ls(1), updatedb(1), xargs(1), lstat(2), stat(2), ctime(3) fnmatch(3), printf(3), strftime(3), locatedb(5), regex(7)

       Full documentation <https://www.gnu.org/software/findutils/find>
       or available locally via: info find

                                                                                                                                                                                                                         FIND(1)

Title: `find` Command Non-Bugs, Bugs, Reporting Bugs, Copyright, and See Also
Summary
This section addresses common misconceptions about the `find` command, particularly related to operator precedence and the "paths must precede expression" error. It then highlights inherent security issues with actions like `-exec` and recommends using `-execdir` instead. It also points out that the LC_COLLATE variable doesn't affect the `-ok` action. Finally, it provides instructions for reporting bugs, details the copyright information, and lists related utilities and documentation for further reading.