Grep Recursive search directory depth option?
I know grep can search recursively (ie through all subdirectories to the bottom of the directory tree), but is it possible to ask grep to only search say, 3 levels down? That means the current directory, any directories in the current directory, and within any directories within those?
Sounds confusing, but the problem is quite simple. Is the solution? Thanks |
Maybe using find along side of grep?
Code:
grep text `find . -maxdepth 3 -type f` Cheers, Josh |
All times are GMT -5. The time now is 05:47 PM. |