2009-10-12

Replace and Find String Cross Multiple Files

> find . -name "*.php" -print | xargs sed -i 's/foo/bar/g'
> find . | xargs grep 'string'
> find . -name "*.cpp" -o -name "*.h" -print

reference:
Rushi's blog

No comments:

Post a Comment