How can I grep a file?

Simple, but not for me.

How can I find out where a certain file is:  i.e. index.html on my server?

I am using ssh and someone else has already loaded the site to the server, but does not know which folder the website lies.

Is there an easy way to do this?

Thanks!
foreverditaAsked:
Who is Participating?
 
veedarConnect With a Mentor Commented:
as root run
  updatedb

then run
  locate index.html

or

find / -xdev -print | grep index.html

-xdev only looks in the root filesystem but I expect index.html is  under root
0
 
JammyPakCommented:
actually, for RedHat the default location for index.html would be in /var/www/html/ so you may not want to use -xdev....
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.