Re: GNU find: "print0" and "-type" arguments
On Wed, Aug 01, 2012 at 07:33:35PM -0500, Alex Robbins wrote:
> This is the expected output. However, when I execute:
> find -print0 -type d
> I see (on a terminal screen that does not display null characters):
> The same goes for using "-type f". It appears as though find
> ignores the -type argument when the -print0 option is passed. Isn't
> this a bug?
No. If you refer to the man page, it will reveal that -print0 actually
outputs null characters instead of newlines. It is usually useful in
conjunction with the -0 option for xargs to run commands on each file
or directory found by find. Please read the man pages and they have
nice examples at the bottom.
Absolutely nothing should be concluded from these figures except that
no conclusion can be drawn from them.
-- Joseph L. Brothers, Linux/PowerPC Project)