Solved

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

Posted on 2011-09-21
1
416 Views
Last Modified: 2012-05-12
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
Comment
Question by:ee-gd
1 Comment
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
ID: 36573233
find . -name "*.html" -type f |xargs grep -l "entry"

wmp
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question