2013-06-27

Tiny convenient bash functions to find files


Look for file by name, case insensitive, containing the given string:

function mfind
{
   find . -iname "*$1*"
}

Grep second parameter in files with names including first parameter. Could be replaced by a grep with --include option.

function mgrep
{
   find . -iname "*$1*" -exec grep -in $2 {} \+
}