Jeremy's Notes

The Reverie of a Techie


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
blog:linux_search_file_contents [2021/01/05 17:27] – Removed table of contents Jeremy McReynoldsblog:linux_search_file_contents [2021/01/09 15:47] (current) – external edit 127.0.0.1
Line 4: Line 4:
 <code bash>user@host:~$ grep -rnw '/path/to/directory/' -e 'searchterm'</code> <code bash>user@host:~$ grep -rnw '/path/to/directory/' -e 'searchterm'</code>
  
-Here's a breakdown of the aforementioned example command and search parameters:+Here's a breakdown of the example command and its parameters:
   * ''-r'' or ''-R'' will recursively (within directories) look at all files within the specified path.   * ''-r'' or ''-R'' will recursively (within directories) look at all files within the specified path.
   * ''-n'' will display the line number where the term shows up within each file.   * ''-n'' will display the line number where the term shows up within each file.
blog/linux_search_file_contents.1609885666.txt.gz · Last modified: 2021/01/09 15:47 (external edit)