Next: , Up: Actions   [Contents][Index]


3.1 Print File Name

Action: -print

True; print the entire file name on the standard output, followed by a newline. If there is the faintest possibility that one of the files for which you are searching might contain a newline, you should use ‘-print0’ instead.

Action: -fprint file

True; print the entire file name into file file, followed by a newline. If file does not exist when find is run, it is created; if it does exist, it is truncated to 0 bytes. The named output file is always created, even if no output is sent to it. The file names /dev/stdout and /dev/stderr are handled specially; they refer to the standard output and standard error output, respectively.

If there is the faintest possibility that one of the files for which you are searching might contain a newline, you should use ‘-fprint0’ instead.