• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 441
  • Last Modified:

scan files contents to find specific text and output paths to those files and/or replace text

i have ssh access to this web server and I would like to search for presence of specific words in the site files - how can I do that?

we need to re-brand and even though the designers have changed images and the more obvious stuff - I came across a page that had meta tags that were out of date and contained the old company name...

i understand I can use something like this to replace texts, but how can I simply list files that contain the entry?
find . -name "*.html" -type f -exec sed -i 's/text1/text2/g' {} ";"

Open in new window

0
ee-gd
Asked:
ee-gd
1 Solution
 
woolmilkporcCommented:
find . -name "*.html" -type f |xargs grep -l "entry"

wmp
0

Featured Post

Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now