Linux searches for files containing keywords in the current directory

1、find ./ -name '“.” | xargs grep “Hbase”
2、grep -rn “Hbase”

Search for files containing Hbase keywords in the current directory

General search method
If you don’t know the approximate directory where the file is located and know the type of the file (such as text type txt), you can search based on a specific string in the root directory /:
find / -type f -name "*.txt" | xargs grep “Hello”

Guess you like

Origin blog.csdn.net/weixin_45163291/article/details/131760205