Posts Tagged ‘search’

Techy: Find and replace on Linux excluding SVN folders

September 7th, 2009

Just another snippet aid to memory, this find and replace (using perl) uses Linux’s find’s “prune” syntax to “prune” the path before it to avoid doing and search and replace on .svn folders:

find -path '*/.svn' -prune -o -type f -exec /usr/bin/perl -pi -e "s/ORIGINAL/NEW/g" {} \;

gamy-dance
%d bloggers like this: