Wednesday, March 10, 2010

linux find exclude dir grep

using linux, here is a way to find all files with a given extension, with a given content, within a directory excluding a particular path

find -name "*.extension" ! -path './excluded_dir/*' -exec grep "searched_content" {} --color -H \;

it took me a little while to construct, so i find it cool to save it here

No comments:

Post a Comment