Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Grep For A File, Excluding Svn Metadata Directories And Files

DZone's Guide to

Grep For A File, Excluding Svn Metadata Directories And Files

·
Free Resource
Grep for something, excluding the annoying svn metadata (.svn**)
The find piece could also be used for more general tasks -- just remove the pipe and take a look at the output to see if it will work for you.
I tried (and failed) to use the find to a path preserving copy from within a subdirectory in a checkout...though there must be a way.


find . -path '*/.svn' -prune -o -type f -print | xargs -e grep -I -n -e PATTERN
Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}