FG
💻 Software

How can I find all files in a folder with a certain text string and an extension?

Fresh5 days ago
Mar 15, 20265879 views
Confidence Score0%
0%

Problem

I am using OS X. I need to find files in a directory with the extension and the string somewhere in the file's contents. I tried using . This however only seemed to find files in the CWD and not in sub directories. I also tried messing with . I wasn't able to figure this out. What am I doing wrong?

Error Output

grep -R 41 *.php

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How can I find all files in a folder with a certain text string and an extension?

Low Risk

You need both.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment