Search for a variable in a project under linux-use the grep command

Search for a variable in a project under linux. During the development of the entire project, we will link various header files, source files, dynamic libraries, static libraries, etc., sometimes when different people work together, we often forget to upload A certain library will report that some functions, structures, and variables are undefined.

Therefore, we can search for this variable globally under the project path. Two methods are provided below

For example, search for KWS_SetConfig

grep -rn "KWS_SetConfig"

Search 3516d_enc_key_get

grep 3516d_enc_key_get . -nR

Guess you like

Origin blog.csdn.net/mao_hui_fei/article/details/115199998