Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Bash Command / Bashrc Function to find any occurrence of a key phrase in files or filepaths
function findit() {
{ mlfind . -iname "*$1*";
grep -irl "$1" .
} | sort -u
export -f findit
# Returns a list of filepaths where the key phrase occurs.
# Case insensitive
# Usage:
# findit keyword
# findit 'key phrase'
# findit 'key phrase' > output.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment