If there is an error on the find
command line, an error message
is normally issued. However, there are some usages that are
inadvisable but which find
should still accept. Under these
circumstances, find
may issue a warning message. By default,
warnings are enabled only if find
is being run interactively
(specifically, if the standard input is a terminal). Warning messages
can be controlled explicitly by the use of options on the command
line:
-warn
-nowarn
These options take effect at the point on the command line where they are specified. Therefore if you specify -nowarn at the end of the command line, you will not see warning messages for any problems occurring before that. The warning messages affected by the above options are triggered by:
The default behaviour above is designed to work in that way so that existing shell scripts which use such constructs don't generate spurious errors, but people will be made aware of the problem.
Some warning messages are issued for less common or more serious problems, and so cannot be turned off: