WTF *Nix

Just another *nix Blog

Just like the title says, so here you go, this will simply help you out in a couple of bash commands:

(Newbie alert: If you copy the command, do NOT copy the # this is just there for you simulating that it’s the BASH prompt, or I can use $, just depends on your ENV!)

# for i in `find / -iname core.* 2>/dev/null`;do rm -f $i;done
# for i in `find / -iname error_log 2>/dev/null`;do echo > $i;done

So WTF Get’r done!

Share and Enjoy:
  • Google Bookmarks
  • MySpace
  • Facebook
  • StumbleUpon
  • Print
  • email
  • Digg

Apache Error Log File(s)

Apr-27-2008 By WTF *Nix

Alot of questions always keep coming too me, where do I “FIND” apache log files or where do I “locate” them? Well keywords find and locate can both help you find them within a *nix box. Literally they can, because both are commands. Anyhow normally on a blank box /var/log/httpd/error_log file is a good source for error information. Unlike the /var/log/httpd/access_log file, where this is no standard-type formatting within this file.

Typical errors, should I say will be found within this error_log file where HTTP queries and requests for files that don’t exist (40r), or are forbidden (404) for certain directory requests. You will also see startup errors, which will also help you troubleshoot any apache startup issues you may face. Also, as many know or don’t pretty much all CGI script errors will be found in there as well. Many times CGI breaks or fails with a blank screen on your browser, you can find it in here as well. Hope this helps some out and Google indexes this post rapidly to take down about 20 e-mails a week. :P

Remember if you were working on a page and wanted to watch for errors in real-time, feel free to use the ssh command “tail -f /var/log/httpd/error_log” (Less the quotes.)

Enjoy!

Share and Enjoy:
  • Google Bookmarks
  • MySpace
  • Facebook
  • StumbleUpon
  • Print
  • email
  • Digg