grep recursive deapth code example Example: recursive grep recursion depth find . -type f -maxdepth 2 -exec grep -l 'pattern' {} \;