Piping the output of find into a new command (find, xargs)
By jeltsch on Wed, 05/23/2007 - 21:58E.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