 <p>My technique for this is to write a shell script that does the job, and then run it via <code>find</code>. For example, your actions could be written into a script <code>munger.sh</code>:</p> <pre><code>#!/bin/sh for file in "$@" do output="output_dir/$(basename "$file")" sed -e 's:foo:bar:g' "$file" &gt; "$output" done </code></pre> <p>The <code>find</code> command becomes:</p> <pre><code>find input_dir -name "PATTERN" -exec sh munger.sh {} + </code></pre> <p>This runs the script with the file names as arguments, bundling conveniently large number of file names into a single invocation of the shell script. If you're not going to need it again, you can simply remove <code>munger.sh</code> when you're done.</p> <p>Yes, you can do all sorts of contortions to execute the command the way you want (perhaps using <code>find … -exec bash -c "the script to be executed" arg0 {} +</code>) but it is often harder than writing a relatively simple script and using it and throwing it away. There tend to be fewer problems with quoting, for example, when you run an explicit script than when you try to write the script on the command line. If you find yourself fighting with single quotes, double quotes and backslashes (or back-quotes), then it is time to use a simple script as shown.</p>