Piping the output of find into a new command (find, xargs)

E.g. to change the permissions of all directories:

find . -type d -print | xargs /bin/chmod ug+rx

To be able to handle directory names with special characters

find . -type d -print0 | xargs -0 /bin/chmod ug+rx

In order to find all tif files in the current directory or below and to compress them (using the ImageMagick "mogrify" command and LZW compression):

find . -name '*.tif' -print | xargs mogrify -compress LZW

Apart from the "xargs" method, some command (including find) accept the "-exec" argument. The following finds all files in the current directory that are smaller than 4k and deletes them:

find . -size -4k -exec rm {} \;