recursive

Recursive grep

grep (case-insensitive, recursive) grep doesn't offer any possibility to recursively descent down the directory tree. The following command searches e.g. just thru all the files in the current directory:

grep bacteria *

To make the search case-insensitive, one can use the i flag:

grep -i bacteria *

But if you want to do a recursive search you have to use a quite complicated construction of UNIX commands to achieve this goal:

find ~/Mail -type f -exec grep 'bacteria' {} \; -print

Find and replace with perl

To replace the string jeltsch.blogspot.com by the string mnm.no-ip.com/blog you can use perl:perl -pi.bak -e 's|jeltsch.blogspot.com|mnm.no-ip.com\/blog|g' *.html If you want to do a recursive replacement on a directory tree you can try:perl -pi.bak -e 's|jeltsch.blogspot.com|mnm.no-ip.com\/blog|g' `find jeltsch.org -name '*.html'`

Pages