LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Find Command Need Help (https://www.linuxquestions.org/questions/linux-newbie-8/find-command-need-help-607919/)

swamprat 12-19-2007 01:36 PM

Find Command Need Help
 
Hello all,

I need some help with the find command.

I'm trying to find a name of a hosted web site on my Centos box.

Something like xyz.com.

I would like to search all files from the root down to see if 'xyz' is some here there and to display the results.

I tried this 'find / -name xyz -print but it didn't work, no results displayed.

I know for sure that xyz is there imbeded in some file.

Thanks.

jailbait 12-19-2007 01:38 PM

Quote:

Originally Posted by swamprat (Post 2996044)
Hello all,

I need some help with the find command.

I'm trying to find a name of a hosted web site on my Centos box.

Something like xyz.com.

I would like to search all files from the root down to see if 'xyz' is some here there and to display the results.

I tried this 'find / -name xyz -print but it didn't work, no results displayed.

I know for sure that xyz is there imbeded in some file.

Thanks.

Try:

find / -iname "*xyz*" | less

--------------------------
Steve Stites

zoranp 12-19-2007 01:57 PM

Or maybe

grep -i virtualhost `find /etc/ -name httpd.conf`

pixellany 12-19-2007 02:11 PM

ls -R / |grep xyz

Note that the -name option in find works on whole words only (or with a wild card)
grep, however, matches the specified fragment

zoranp 12-19-2007 02:27 PM

Just a thought...

Hosted WEB site is probably virtual host described in httpd.conf.

swamprat 12-19-2007 03:02 PM

Thank you all, very helpful...


All times are GMT -5. The time now is 03:57 PM.