Results 1 to 3 of 3
Hey all,
I'm on ubuntu and using apache web server. Problem is when I run "locate httpd.conf", a ton of files come up. But I only want the conf file ...
- 12-10-2011 #1Just Joined!
- Join Date
- Apr 2011
- Posts
- 6
search for string within a file under all directories from root
Hey all,
I'm on ubuntu and using apache web server. Problem is when I run "locate httpd.conf", a ton of files come up. But I only want the conf file that contains the string "dev.site.com" So from the root I try running this:
grep dev.mysite.com httpd.conf
and it says no file httpd.conf and thats because there is no file in the immediate root directory called that. How can I search all directories from root for that file which contains the string specified.
thanks for response
- 12-10-2011 #2But how come, you have so many of them and shouldnt they be in /etc/apache/ ?Code:
locate httpd.conf |xargs grep "dev.mysite.com"
You must always face the curtain with a bow.
- 12-10-2011 #3


Reply With Quote
