To prevent problems with spaces in filenames when running the ‘find’ command with -exec, use double quotes:
find . -type f -name "*.html" -exec grep ls "{}" \;
Last modified: 09/11/2011 Tags: find, exec
Other pages possibly of interest:
This website is a personal resource. Nothing here is guaranteed correct or complete, so use at your own risk and try not to delete the Internet. -Stephan
mindspill.net © Stephan Dale.
Privacy policy