<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: term code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Sun, 07 Sep 2008 18:18:51 GMT</pubDate>
    <description>DZone Snippets: term code</description>
    <item>
      <title>Watch a log and/or search for a certain term</title>
      <link>http://snippets.dzone.com/posts/show/2066</link>
      <description>If you're developing on a server that has all PHP errors turned off, you can still watch the error log (if you have access to this file). For example on a dreamhost account you could try this:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;tail -f /home/account/logs/website.com/http/error.log&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;As the errors pour in, you will see them come by. Change 'account' to the username you have on dreamhost and website.com to the domainname you host there. If the errors come in large amounts you can filter them by using grep:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;tail -f /home/account/logs/website.com/http/error.log | grep -i "search_term"&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now only errors containing 'search_term' will be shown.</description>
      <pubDate>Thu, 18 May 2006 00:29:47 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/2066</guid>
      <author>yoghoyogho ()</author>
    </item>
    <item>
      <title>Find files with a certain extension, where the files contain a certain search term</title>
      <link>http://snippets.dzone.com/posts/show/2061</link>
      <description>Searches the current directory and deeper for files ending with the 'php' extension, where the file itself contains 'search_term'. Useful if you're searching a large website with lots of images and you only want to find a certain function or variable.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;find ./ -type f -name \*.php -exec grep -il "search_term" {} \;&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Thu, 18 May 2006 00:15:34 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/2061</guid>
      <author>yoghoyogho ()</author>
    </item>
  </channel>
</rss>
