Is it possible to grep for a string that is hidden within multiple directories from the root directory of my server? For instance, if I SSH into my Ubuntu server and then want to grep for a certain string, but I don't know which subfolder it is in, can I just grep from the root directory?
You can use the
-r option to grep recursively:
Read all files under each directory, recursively, following symbolic links only if they are on the command line.
On a typical system, it might not be a good idea, as grep doesn't have an option to not descend into mounted file systems. You would end up going through file systems like