Which is faster, 'find -exec' or 'find | xargs -0'?
In my web application I render pages using PHP script, and then generate static HTML files from them. The static HTML are served to the users to speed up performance. The HTML files become stale eventually, and need to be deleted. I am debating between two ways to write the eviction script. The first is using a single find command, like find /var/www/cache -type f -mmin +10 -exec rm \{} \; The second form is by piping through xargs, something like find /var/www/cache -type f -mmin +10 -print0 | xargs -0 rm The first form invokes rm for each file it finds, while the second form just sends all