• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 314
  • Last Modified:

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!
0
foreverdita
Asked:
foreverdita
1 Solution
 
veedarCommented:
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

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now