Solved

Linux Command to search file

Posted on 2011-03-20
3
560 Views
Last Modified: 2012-05-11
Hi Guys,

I'm using CentOS.

I want to display all the files in my computer that contain word logo.

Please inform what command needs to be used?
0
Comment
Question by:softbless
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
upanwar earned 500 total points
ID: 35178126
You can search recursively i.e. read all files under each directory for a string.

# grep -r "logo" /

In above example system will search in entire system. If you know the perticular directry then spercify the directory name.

example:

# grep -r "logo" /data
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35178138
Here is a very good exapmle of this command for different possiblieties.

http://www.cyberciti.biz/faq/howto-search-find-file-for-text-string/
0
 

Author Closing Comment

by:softbless
ID: 35178191
thanks
0

Featured Post

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

688 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