In Windows, I would have done a search for finding a word inside a folder. Similarly, I want to know if a specific word occurs inside a directory containing many sub-directories and files. My searches for grep syntax shows I must specify the filename, i.e. grep string filename
.
Now, I do not know the filename, so what do I do?
A friend suggested to do grep -nr string
, but I don't know what this means and I got no results with it (there is no response until I issue a Ctrl + C).
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…