Sometimes when we temporarily modify the code, we don't need or have conditions to use the complex Code Editor. You can quickly locate and modify the code using a normal text editor such as Nano or VIM, plus the grep command.
For example, search for config_board_s3c4410_xxx content under the kernel directory:
Grep-nre ' config_board_s3c4410_xxx ' kernel
Parameter description:
N-Travel number
R-Traverse
E-Use regular expressions
This will then walk through the content you are looking for and list the file name and line number.
With the VIM command:
Vim xxx +n
which
XXX is the file path information of the preceding grep output
n is the line number of the signature grep output
We can't remember the complicated commands, but the simple commands can still remember many.
- This article is from: Linux Tutorial Network
Quickly locate code locations using the grep command