0

How would I do the above? Would it be different for each text editor? Could it be done in the terminal? Thanks

user49888
  • 365

1 Answers1

3

If you are using a text editor, use your text editor's search command. For example, in vim, use / followed by the text you want to search for, and press Enter. Pressing n goes to the next occurrence.

If you want to list all occurrences from the command line, use grep:

grep myMethodName filename.c

If you want a prettier display than grep, and more features, try ack:

ack myMethodName filename.c
Greg Hewgill
  • 7,053
  • 2
  • 32
  • 34