Bash find with multiple exec parameters

Run multiple exec commands with find.

The find command accepts multiple -exec parameters.

Example that looks in certain directories for a file with a keyword.

$ find . -type d ! -path . -exec echo "Searching in {}" \; -exec grep -Ri "keyword" {} \;
Did this help you? Please let me know with a comment. Thank you
Posted .

Comments (RSS)

Leave a comment