Run mulitple ‘exec’ commands to UNIX ‘find’ command
Tuesday, March 30th, 2010Problem
You want to apply multiple commands against the results of ‘find’
Solution
Just pass as many exec options as you want
.
The command below will run ‘id’, ‘echo’ and ‘file’
% find . -type f -exec id {} \; -exec echo ' and ' \; -exec file {} \;