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