I've got a setup where I need to use 'find' to find 0 or more files in a certain directory, however, 'find' always produces an error when there are no files that match a certain check. Is it possible to run 'find' while having it omit errors when no files match the pattern?
|
feedback
|
|
Like @grawity said find isn't expected to report these errors. Anyway if you want to suppress error output redirect stderr to /dev/null:
One typical case in which find write to stderr happens when there is a directory in your find searching sub-path that hasn't the permission to be opened. | ||||
|
feedback
|
|
Can you just ignore the errors? Or, more specifically, redirect them to | |||
feedback
|
finddoes not report such errors by default, at least not on my systems. – grawity Aug 21 '11 at 10:36