« Back to Index

Find and execute using find and -exec flag

View original Gist on GitHub

Find and execute.md

To find some files and execute an additional action on them, use -exec:

find . -name *.rb -exec md5 -s {} \;

Note: you need \; otherwise you’ll get an error about no terminating ";" or "+"