Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Linux Command to search file

Posted on 2011-03-20
3
Medium Priority
?
562 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 2000 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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
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…
Suggested Courses

636 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