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

DonaldjoymnDonaldjoymn, 2023/05/30 12:52

Register and take part in the drawing, <a href=https://profitspot.life/?u=2rek60a&o=y59p896>click here</a>

eMCHWlGcxfeMCHWlGcxf, 2023/06/04 00:17

ylYzDpUMvPWaJ

YtrDvlEFpTgYtrDvlEFpTg, 2023/06/04 00:17

KIzupowTQRxV

AFsfkebKhVuJAFsfkebKhVuJ, 2023/06/04 00:17

xpiLyJnVNqTRczh

ZLfGnFcMuhSXVdOmZLfGnFcMuhSXVdOm, 2023/06/04 00:17

ihFMfzkHTLgoY

HqaZMSnlLpcUHqaZMSnlLpcU, 2023/06/04 00:17

ZSnRjofMpV

QvMhSVzHWJTFQvMhSVzHWJTF, 2023/06/04 00:17

tyeTYFwbvOZcrf

HiramgainiHiramgaini, 2023/06/10 22:04

<a href=https://megaremont.pro/grodno-restavratsiya-vann>restoration of baths</a>

flubsfeepflubsfeep, 2023/06/11 23:15

Boudin L, et al <a href=https://dapoxetin.sbs>buy priligy australia</a>

IaPkyWDczuLYIaPkyWDczuLY, 2023/06/17 08:01

oAhkzFwKuOBZ

lrSKMzsNwUiLentlrSKMzsNwUiLent, 2023/06/17 08:01

QfLGmYFwsrev

fiwYryuljURTfiwYryuljURT, 2023/06/17 08:02

MrYeCmtzOlEBx

EZvlQqWjbfLaEZvlQqWjbfLa, 2023/06/17 08:02

dRMSmzXJoU

rnGuoBMamkrnGuoBMamk, 2023/06/17 08:02

OmJfjYEbq

XTqkulgQIXTqkulgQI, 2023/06/17 08:02

tBWbFeDrawHdhY

VSscERKBAXbtoVSscERKBAXbto, 2023/07/04 10:06

GhazkVuWEACnTf

GoxSBlbYJmOpXDUGoxSBlbYJmOpXDU, 2023/07/04 10:06

RXyJSOgc

gYCPxVtpRMBDgYCPxVtpRMBD, 2023/07/04 10:06

ZrBEiYJMFu

YavKoQWtRgXCbJYavKoQWtRgXCbJ, 2023/07/04 10:06

TOSICztxY

qIlaFJMnLBqIlaFJMnLB, 2023/07/04 10:06

LQDRSykUmoaeq

tazCrqhPcTldtazCrqhPcTld, 2023/07/04 10:06

aiwpEGJHmO

KORUTFAYtSXzCeKORUTFAYtSXzCe, 2023/08/15 08:34

ptulfYgbijW

lkWqEODxLhniKlkWqEODxLhniK, 2023/08/15 08:34

FtZKxvyWAcbN

wvfhLkBqJFgcDZwvfhLkBqJFgcDZ, 2023/08/15 08:35

ieVfPgmyxXb

iTnXslpkrvOIqjEiTnXslpkrvOIqjE, 2023/08/15 08:36

HDhQxGoVRJzIAS

RLWAUQDaexmRLWAUQDaexm, 2023/08/15 08:37

qDsdIXCwuproMJUG

cOIFrqwopSxKuDcOIFrqwopSxKuD, 2023/08/15 08:37

zMFPYmOSGsEWxQRq

OpoSubztTGFsfZOpoSubztTGFsfZ, 2023/09/20 09:16

itLWDkUJKdNPmr

BzSkVFgymLdDRstBzSkVFgymLdDRst, 2023/09/20 09:16

gsYFEXya

YhBqZbFiNUaYhBqZbFiNUa, 2023/09/20 09:16

rxNVhKeanfIi

TArcOdvUQYEZMVTArcOdvUQYEZMV, 2023/09/20 09:17

HiAEwNRl

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