Phil for Humanity Phil for Humanity
A Guide for the Survival of Humankind and Helping the World, Society, and Yourself.

Recursive GREP

As I said over and over, grep has two major problems. First, grep tries to run on all files, including binary files. Second, grep only does one directory at a time. So, I wrote this Python script, called, to recursively grep all sub-directories.

Here is the script’s usage:

$ <-i> [word]

For example, here is how to grep all sub-directories for a case insensitive word.


You can download this Python script here, or you can copy-n-paste from down below.

by Phil for Humanity
on 10/02/2014

Related Articles
 » UNIX Support: Recursively GREP
 » Command Loop
 » Wrapper Script