Your Location is: Home > Find

using “find -exec grep” in MingW

From: Taiwan View: 1279 Thad_The_Man 

Question

I'm having trouble doing simple searches in MingW. The following query works:

find 'C:/Dir' -iname '*foo*'

but the query

find 'C:/Dir' -iname '*foo*' -exec grep bar {} \;

fails.

Can anyone point me to the proper syntax for this command being run under MingW in a powershell?

PS: My apologies the error message I get is "missing argument to -exec".

Best answer