Solved

Linux Command to search file

Posted on 2011-03-20
3
556 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
  • 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

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

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…
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

839 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