UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 7th, 2006, 09:55 AM
hamboy hamboy is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Posts: 88 hamboy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 1 h 29 m 18 sec
Reputation Power: 0
Searching text within a file

hi,
i'm trying to find the file in a unix server that contains the text:

"The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, XXXX@XXXX.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log."


i know that you can use the find command, but im not too experienced in using it.. can someone show me how with the text above?

Reply With Quote
  #2  
Old March 7th, 2006, 12:24 PM
jharnois's Avatar
jharnois jharnois is offline
mod_dev_shed
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Sep 2002
Location: Atlanta, GA
Posts: 14,344 jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 2 Days 6 h 26 m 32 sec
Reputation Power: 787
Check in this file:

$apache_install_dir/error/HTTP_INTERNAL_SERVER_ERROR.html.var
__________________
# Jeremy

Explain your problem instead of asking how to do what you decided was the solution.

Reply With Quote
  #3  
Old March 7th, 2006, 02:36 PM
playskool playskool is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 48 playskool Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 23 h 5 m 35 sec
Reputation Power: 0
find /start/of/search/path | xargs grep "something"

You might want to pick out something very specific text for your grep.

Reply With Quote
  #4  
Old March 7th, 2006, 02:38 PM
playskool playskool is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 48 playskool Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 23 h 5 m 35 sec
Reputation Power: 0
Maybe I misunderstood...

find /start/of/search/path -name "filename"

Reply With Quote
  #5  
Old March 8th, 2006, 12:24 PM
hamboy hamboy is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Posts: 88 hamboy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 1 h 29 m 18 sec
Reputation Power: 0
Quote:
Originally Posted by jharnois
Check in this file:

$apache_install_dir/error/HTTP_INTERNAL_SERVER_ERROR.html.var




can i do this?
find / -name "HTTP_INTERNAL_SERVER_ERROR.html.var"

also, is HTTP_INTERNAL_SERVER_ERROR.html.var where all server error logs are stored for all unix servers?

Reply With Quote
  #6  
Old March 8th, 2006, 01:48 PM
jharnois's Avatar
jharnois jharnois is offline
mod_dev_shed
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Sep 2002
Location: Atlanta, GA
Posts: 14,344 jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level)jharnois User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 2 Days 6 h 26 m 32 sec
Reputation Power: 787
The error quoted in your original post is (or appears to be) what Apache sends to the browser (by default) when a 500 server error occurs. Apache has one of these .html.var pages for just about every possible server error, and it's configured (via ErrorDocument in httpd.conf) to show these files when one of those errors occurs. They are in $apache_install_dir/error/

Apache logs its errors in the file set by ErrorLog in httpd.conf. It may or may not be similar to the error message displayed in the browser, and it will show more information.

So when Apach encounters an error, two things happen: it logs an error in the ErrorLog and sends the ErrorDocument for that error to the browser. You may see that as one action: "an error occurred", but I see it as two actions that are related by the fact that an error occurred.


BTW:
Code:
grep -r "The server encountered an internal error" /usr/local

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > Searching text within a file


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway