I'm trying to to grep
through all the files within a certain directory. Is there a way to recursively list all directories & the files/directories within them via something like ls
?
Try the -r option for grep. Here is a reference: https://linuxize.com/post/how-to-use-grep-command-to-search-files-in-linux/#recursive-search.
The search matches list out the path to the files that match your pattern as well. Should be easy to extract that out using something like cut