Home Explore Blog CI



man-pages

6th chunk of `find.man`
2e09c58a20bfaddce7e8ffdf7e7dc5be719ab8e621eb2fd00000000100000fa9
    points, just before the first test, positional option or action.  If you specify a global option in some other place, find will issue a warning message explaining that this can be confusing.

       The global options occur after the list of start points, and so are not the same kind of option as -L, for example.

       -d     A synonym for -depth, for compatibility with FreeBSD, NetBSD, MacOS X and OpenBSD.

       -depth Process each directory’s contents before the directory itself.  The -delete action also implies -depth.

       -files0-from file
              Read  the  starting points from file instead of getting them on the command line.  In contrast to the known limitations of passing starting points via arguments on the command line, namely the limitation of the
              amount of file names, and the inherent ambiguity of file names clashing with option names, using this option allows to safely pass an arbitrary number of starting points to find.

              Using this option and passing starting points on the command line is mutually exclusive, and is therefore not allowed at the same time.

              The file argument is mandatory.  One can use -files0-from - to read the list of starting points from the standard input stream, and e.g. from a pipe.  In this case, the actions -ok and -okdir are  not  allowed,
              because they would obviously interfere with reading from standard input in order to get a user confirmation.

              The starting points in file have to be separated by ASCII NUL characters.  Two consecutive NUL characters, i.e., a starting point with a Zero‐length file name is not allowed and will lead to an error diagnostic
              followed by a non‐Zero exit code later.

              In  the case the given file is empty, find does not process any starting point and therefore will exit immediately after parsing the program arguments.  This is unlike the standard invocation where find assumes
              the current directory as starting point if no path argument is passed.

              The processing of the starting points is otherwise as usual, e.g.  find will recurse into subdirectories unless otherwise prevented.  To process only the starting points, one can additionally pass -maxdepth 0.

              Further notes: if a file is listed more than once in the input file, it is unspecified whether it is visited more than once.  If the file is mutated during the operation of find, the result  is  unspecified  as
              well.   Finally,  the seek position within the named file at the time find exits, be it with -quit or in any other way, is also unspecified.  By "unspecified" here is meant that it may or may not work or do any
              specific thing, and that the behavior may change from platform to platform, or from findutils release to release.

       -help, --help
              Print a summary of the command‐line usage of find and exit.

       -ignore_readdir_race
              Normally, find will emit an error message when it fails to stat a file.  If you give this option and a file is deleted between the time find reads the name of the file from the directory and the time  it  tries
              to  stat  the  file,  no error message will be issued.  This also applies to files or directories whose names are given on the command line.  This option takes effect at the time the command line is read, which
              means that you cannot search one part of the filesystem with this option on and part of it with this option off (if you need to do that, you will need to issue two find commands instead, one with the option and
              one without it).

              Furthermore, find with the -ignore_readdir_race option will ignore errors of the -delete action in the case the file has disappeared since the parent directory was read: it will not output an error  diagnostic,
              and the return code of the -delete action will be true.

Title: find Global Options Continued: -depth, -files0-from, -help, -ignore_readdir_race
Summary
Continuing from the previous chunk, this section details additional global options in `find`. It elaborates on `-depth`, `-files0-from` which reads starting points from a file, `-help` for displaying usage information, and `-ignore_readdir_race` for suppressing error messages when files are deleted during the search.