Home Explore Blog CI



man-pages

3rd chunk of `find.man`
184089ba7152776818b60af1101b386b26725fbf9bdf21a00000000100000fb0
 symbolic link, and the -P option is in effect (or if neither -H nor -L were specified), the information used for the comparison will be taken from the properties of the symbolic
       link.  Otherwise, it will be taken from the properties of the file the link points to.  If find cannot follow the link (for example because it has insufficient privileges or the link points to a nonexistent file)  the
       properties of the link itself will be used.

       When  the -H or -L options are in effect, any symbolic links listed as the argument of -newer will be dereferenced, and the timestamp will be taken from the file to which the symbolic link points.  The same considera‐
       tion applies to -newerXY, -anewer and -cnewer.

       The -follow option has a similar effect to -L, though it takes effect at the point where it appears (that is, if -L is not used but -follow is, any symbolic links appearing after -follow on the command  line  will  be
       dereferenced, and those before it will not).

       -D debugopts
              Print  diagnostic information; this can be helpful to diagnose problems with why find is not doing what you want.  The list of debug options should be comma separated.  Compatibility of the debug options is not
              guaranteed between releases of findutils.  For a complete list of valid debug options, see the output of find -D help.  Valid debug options include

              exec   Show diagnostic information relating to -exec, -execdir, -ok and -okdir

              opt    Prints diagnostic information relating to the optimisation of the expression tree; see the -O option.

              rates  Prints a summary indicating how often each predicate succeeded or failed.

              search Navigate the directory tree verbosely.

              stat   Print messages as files are examined with the stat and lstat system calls.  The find program tries to minimise such calls.

              tree   Show the expression tree in its original and optimised form.

              all    Enable all of the other debug options (but help).

              help   Explain the debugging options.

       -Olevel
              Enables query optimisation.  The find program reorders tests to speed up execution while preserving the overall effect; that is, predicates with side effects are not reordered relative to each other.  The opti‐
              misations performed at each optimisation level are as follows.

              0      Equivalent to optimisation level 1.

              1      This is the default optimisation level and corresponds to the traditional behaviour.  Expressions are reordered so that tests based only on the names of files (for example -name and -regex) are performed
                     first.

              2      Any -type or -xtype tests are performed after any tests based only on the names of files, but before any tests that require information from the inode.  On many modern versions of Unix,  file  types  are
                     returned  by  readdir()  and so these predicates are faster to evaluate than predicates which need to stat the file first.  If you use the -fstype FOO predicate and specify a filesystem type FOO which is
                     not known (that is, present in ‘/etc/mtab’) at the time find starts, that predicate is equivalent to -false.

              3      At this optimisation level, the full cost‐based query optimiser is enabled.  The order of tests is modified so that cheap (i.e. fast) tests are performed first  and  more  expensive  ones  are  performed
                     later,  if  necessary.  Within each cost band, predicates are evaluated earlier or later according to whether they are likely to succeed or not.  For -o, predicates which are likely to succeed are evalu‐
                     ated earlier, and for -a, predicates which are likely to fail are evaluated earlier.

              The cost‐based optimiser has a fixed idea of how likely any given test

Title: find Options: Symbolic Links, Debugging, and Optimization
Summary
This section explains how `find` handles symbolic links with `-H` and `-L` options in the context of `-newer` and similar predicates, as well as the `-follow` option. It also describes the `-D` debugopts option, which provides diagnostic information for troubleshooting, and the `-Olevel` option, which enables query optimization for faster execution by reordering tests.