Jeremy's Notes

The Reverie of a Techie


Sidebar

What is this thing?

You've stumbled across a blog that chronicles the interests of its author. You'll find technology how-tos, demonstrations, recommendations, and reviews. Stand by!




Follow me on Twitter, Facebook, and other social networks.

How to find files containing specific text in Linux?

Penguin by Lars Meiertoberens from the Noun Project If you would like to find a specific string of text within a directory of files, you can use the following command and example:

user@host:~$ grep -rnw '/path/to/directory/' -e 'searchterm'

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.
  • -n will display the line number where the term shows up within each file.
  • -w Matches the whole word.

Sources

Share

Tags

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies

Discussion

RaymondInvigRaymondInvig, 2023/04/21 12:25

Hey there,

If you are one of the sufferers of the common problems nails have, then you are in luck! Our Toenail Clippers is here to help. It has a specially designed clip that can help those with troubles with winding nails, hard nails, two nails, nail cracks, deep nails, and thickened nails.

We are confident that our Toenail Clippers will provide you with the results you are looking for.

Get yours today with 60% OFF: https://podiatristusa.com

Best regards

FMAhRzpKVxJlFMAhRzpKVxJl, 2023/05/12 06:16

YugcBLTX

SXwfRoriKSXwfRoriK, 2023/05/12 06:16

lpgdnFaOI

hzEdbJcZlftevhzEdbJcZlftev, 2023/05/12 06:16

REHCOgsef

SjTrQMwfdVSjTrQMwfdV, 2023/05/12 06:16

LmjnfYHpEMUFhCt

iHTQBxLgniHTQBxLgn, 2023/05/12 06:16

kNsTFEVlCZWBr

ohfQYMVkegUohfQYMVkegU, 2023/05/12 06:16

TUPyKXnH

Enter your comment. Wiki syntax is allowed:
 
blog/how_to_find_files_containing_specific_text_in_linux.txt ยท Last modified: 2023/04/16 13:11 by 127.0.0.1