Search linux files

Posted on 2006-06-02
Medium Priority
Last Modified: 2010-04-20
I need to search all files in the directory (and subdirectories) /home/me/ for the text "Bad Header".  What Linux command can accomplish this?
Question by:lwinkenb
1 Comment

Accepted Solution

smidgie82 earned 500 total points
ID: 16819567
Hi lwinkenb,

You want GREP!

an example:

cd /home/me
grep "Bad Header" * -r

The output will be a list consisting of the filename in which the match occurred, and the line on which the match occurred.  Look at man grep for more options.


Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can use conditional statements using Python.
I have written articles previously comparing SARDU and YUMI.  I also included a couple of lines about Easy2boot (easy2boot.com).  I have now been using, and enjoying easy2boot as my sole multiboot utility for some years and realize that it deserves …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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.
Suggested Courses
Course of the Month8 days, 10 hours left to enroll

621 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