Search Keyword location in multiple files in Linux
An error occurred while compiling u-boot at one time. nand_readd.o was not allowed. I should have found nand_read.o. I used find-iname "nand_readd. * "if this file is not found, I think it should be the key. I will find this error. Too many files cannot be found. I checked this command on the Internet:
Grep-r -- include = *. h-o -- include = *. cpp-o -- include = *. c <key_words_to_search> <path_to_search>
Where-R,-r, -- recursive
Read all files under each directory, recursively; this is equivalent to the-d
Recurse option.
Combined with reality:
Grep-r -- include = *. * nand_readd ~ /U-boot/
I found it soon.
Or:
Full-text search
: Vimgrep (use commands in normal mode) full-text search. The function is the same as the grep command, but supports multi-file jump location in vim.
Usage: vimgrep Regular Expression file. Files support wildcards. For example, *. c Represents all. c files. If you want to perform recursive search, you can use **/* to search all files.
: Cl list results
: Cc (use command in normal mode) Current result
: Cn (use commands in normal mode) next result
: Cp (use command in normal mode) previous result
: Cw (use commands in normal mode) to re-open the search result window