<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>TechsRx :: BUY :: LEARN :: FIX</title>
	
	<link>http://blog.buylearnfix.com</link>
	<description>Business Strong - People Friendly</description>
	<lastBuildDate>Thu, 21 Jan 2010 02:11:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/BuyLearnFix" /><feedburner:info uri="buylearnfix" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Set correct permissions on your linux/apache website files and directories</title>
		<link>http://feedproxy.google.com/~r/BuyLearnFix/~3/o5iBuricUNY/</link>
		<comments>http://blog.buylearnfix.com/linux/set-correct-permissions-on-your-linuxapache-website-files-and-directories/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 02:11:01 +0000</pubDate>
		<dc:creator>fdrewett</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[Linux Commands]]></category>

		<guid isPermaLink="false">http://blog.buylearnfix.com/?p=101</guid>
		<description><![CDATA[This will help you to easily set correct permissions on your linux/apache website files and directories with one command <a href="http://blog.buylearnfix.com/linux/set-correct-permissions-on-your-linuxapache-website-files-and-directories/">Continue reading Set correct permissions on your linux/apache website files and directories </a>]]></description>
			<content:encoded><![CDATA[<style type="text/css">
	table.dptable {
	width:100%;
	border:0;
}
tr.dphead {
	background-color:#003366;
	color:#FFFFFF;
	font-weight:bold;
}
tr.dphead td a {
	color:#FFFFFF;
}
tr.dprow {
	background-color:#FFFFFF;
}
tr.dprowalt {
	background-color:#CCCCCC;
}
#dpcols-contact {
	text-align:center;
}
#intro {
}	</style><p><script type="text/javascript"><!--
google_ad_client = "pub-4211392724919900";
/* 468x60, created 10/14/09 */
google_ad_slot = "7553694536";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p><div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.buylearnfix.com%2Flinux%2Fset-correct-permissions-on-your-linuxapache-website-files-and-directories%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.buylearnfix.com%2Flinux%2Fset-correct-permissions-on-your-linuxapache-website-files-and-directories%2F" height="61" width="51" title="Set correct permissions on your linux/apache website files and directories " alt=" Set correct permissions on your linux/apache website files and directories " /></a></div><p>This will help you to easily set correct permissions on your linux/apache website files and directories with one command</p>
<p>As root cd to the &#8216;document root path&#8217; of your website directory (ie: html, htdocs, httpdocs) and do as follows</p>
<pre>find . -type f -exec chmod 644 {} \; &amp;&amp; find . -type d -exec chmod 755 {} \;</pre>
<p>or</p>
<pre>find /path/to/docroot/. -type f -exec chmod 644 {} \; &amp;&amp; find . -type d -exec chmod 755 {} \;</pre>
<p>this sets all your files to 644 and all your directories to 755</p>
<p>for example,</p>
<pre>cd /var/www/html 

find . -type f -exec chmod 644 {} \; &amp;&amp; find . -type d -exec chmod 755 {} \;</pre>
<p>As found at <a title="linux-noob.com" href="http://www.linux-noob.com/forums/index.php?/topic/1144-set-correct-permissions-on-your-apache-files/" target="_blank">linux-noob.com</a></p>
<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.buylearnfix.com%2Flinux%2Fset-correct-permissions-on-your-linuxapache-website-files-and-directories%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.buylearnfix.com%2Flinux%2Fset-correct-permissions-on-your-linuxapache-website-files-and-directories%2F" height="61" width="51" title="Set correct permissions on your linux/apache website files and directories " alt=" Set correct permissions on your linux/apache website files and directories " /></a></div><img src="http://blog.buylearnfix.com/?ak_action=api_record_view&id=101&type=feed" alt=" Set correct permissions on your linux/apache website files and directories "  title="Set correct permissions on your linux/apache website files and directories " /><p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-4211392724919900";
/* 468x15, created 10/14/09 */
google_ad_slot = "6588538445";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p><img src="http://feeds.feedburner.com/~r/BuyLearnFix/~4/o5iBuricUNY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.buylearnfix.com/linux/set-correct-permissions-on-your-linuxapache-website-files-and-directories/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.buylearnfix.com/linux/set-correct-permissions-on-your-linuxapache-website-files-and-directories/</feedburner:origLink></item>
		<item>
		<title>Placing Authentication directives directly into httpd.conf instead of using .htaccess</title>
		<link>http://feedproxy.google.com/~r/BuyLearnFix/~3/anz1r_bVsIE/</link>
		<comments>http://blog.buylearnfix.com/linux/placing-authentication-directives-directly-into-httpd-conf-instead-of-using-htaccess/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 14:21:58 +0000</pubDate>
		<dc:creator>techsrx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[.htpasswd]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[auth]]></category>
		<category><![CDATA[authentication]]></category>

		<guid isPermaLink="false">http://blog.buylearnfix.com/linux/placing-authentication-directives-directly-into-httpd-conf-instead-of-using-htaccess/</guid>
		<description><![CDATA[<style type="text/css">
	table.dptable {
	width:100%;
	border:0;
}
tr.dphead {
	background-color:#003366;
	color:#FFFFFF;
	font-weight:bold;
}
tr.dphead td a {
	color:#FFFFFF;
}
tr.dprow {
	background-color:#FFFFFF;
}
tr.dprowalt {
	background-color:#CCCCCC;
}
#dpcols-contact {
	text-align:center;
}
#intro {
}	</style>The purpose of using the "distributed configuration file" .htaccess is so that users may control authentication. It can also be set in the Apache configuration file httpd.conf WITHOUT using the .htaccess file. This can improve server performance as the server will not have to look for the .htaccess file in each subdirectory. 
&#60;Directory /path/to/public_html/membersonly&#62; 
AllowOverride AuthConfig 
AuthName "Add message visitors will see here. Keep Out!" 
AuthType Basic 
AuthUserFile /path/to/public_html/membersonly.htpasswd 
AuthGroupFile <a href="http://blog.buylearnfix.com/linux/placing-authentication-directives-directly-into-httpd-conf-instead-of-using-htaccess/">Continue reading Placing Authentication directives directly into httpd.conf instead of using .htaccess</a>]]></description>
			<content:encoded><![CDATA[<style type="text/css">
	table.dptable {
	width:100%;
	border:0;
}
tr.dphead {
	background-color:#003366;
	color:#FFFFFF;
	font-weight:bold;
}
tr.dphead td a {
	color:#FFFFFF;
}
tr.dprow {
	background-color:#FFFFFF;
}
tr.dprowalt {
	background-color:#CCCCCC;
}
#dpcols-contact {
	text-align:center;
}
#intro {
}	</style><div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.buylearnfix.com%2Flinux%2Fplacing-authentication-directives-directly-into-httpd-conf-instead-of-using-htaccess%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.buylearnfix.com%2Flinux%2Fplacing-authentication-directives-directly-into-httpd-conf-instead-of-using-htaccess%2F" height="61" width="51" title="Placing Authentication directives directly into httpd.conf instead of using .htaccess" alt=" Placing Authentication directives directly into httpd.conf instead of using .htaccess" /></a></div><p>The purpose of using the &#8220;distributed configuration file&#8221; .htaccess is so that users may control authentication. It can also be set in the Apache configuration file httpd.conf WITHOUT using the .htaccess file. This can improve server performance as the server will not have to look for the .htaccess file in each subdirectory.</p>
<pre>&lt;Directory /path/to/public_html/membersonly&gt;
AllowOverride AuthConfig
AuthName "Add message visitors will see here. Keep Out!"
AuthType Basic
AuthUserFile /path/to/public_html/membersonly.htpasswd
AuthGroupFile /dev/null
require user name-of-user
&lt;/Directory&gt;
</pre>
<p>Require user is optional. There is a lot of good information about httpd.conf, .htaccess in a tutorial at this link.<br />
<a href="http://www.yolinux.com/TUTORIALS/LinuxTutorialApacheAddingLoginSiteProtection.html">http://www.yolinux.com/TUTORIALS/LinuxTutorialApacheAddingLoginSiteProtection.html</a></p>
<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.buylearnfix.com%2Flinux%2Fplacing-authentication-directives-directly-into-httpd-conf-instead-of-using-htaccess%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.buylearnfix.com%2Flinux%2Fplacing-authentication-directives-directly-into-httpd-conf-instead-of-using-htaccess%2F" height="61" width="51" title="Placing Authentication directives directly into httpd.conf instead of using .htaccess" alt=" Placing Authentication directives directly into httpd.conf instead of using .htaccess" /></a></div><img src="http://blog.buylearnfix.com/?ak_action=api_record_view&id=100&type=feed" alt=" Placing Authentication directives directly into httpd.conf instead of using .htaccess"  title="Placing Authentication directives directly into httpd.conf instead of using .htaccess" /><img src="http://feeds.feedburner.com/~r/BuyLearnFix/~4/anz1r_bVsIE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.buylearnfix.com/linux/placing-authentication-directives-directly-into-httpd-conf-instead-of-using-htaccess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.buylearnfix.com/linux/placing-authentication-directives-directly-into-httpd-conf-instead-of-using-htaccess/</feedburner:origLink></item>
		<item>
		<title>Clean install with Windows 7 Upgrade media: How does that work exactly?</title>
		<link>http://feedproxy.google.com/~r/BuyLearnFix/~3/8vFKMAUQJhQ/</link>
		<comments>http://blog.buylearnfix.com/windows/clean-install-with-windows-7-upgrade-media-how-does-that-work-exactly/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 18:09:31 +0000</pubDate>
		<dc:creator>fdrewett</dc:creator>
				<category><![CDATA[windows]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[upgrade os]]></category>
		<category><![CDATA[windows 7]]></category>

		<guid isPermaLink="false">http://blog.buylearnfix.com/windows/clean-install-with-windows-7-upgrade-media-how-does-that-work-exactly/</guid>
		<description><![CDATA[<style type="text/css">
	table.dptable {
	width:100%;
	border:0;
}
tr.dphead {
	background-color:#003366;
	color:#FFFFFF;
	font-weight:bold;
}
tr.dphead td a {
	color:#FFFFFF;
}
tr.dprow {
	background-color:#FFFFFF;
}
tr.dprowalt {
	background-color:#CCCCCC;
}
#dpcols-contact {
	text-align:center;
}
#intro {
}	</style><div> 
<p style="MARGIN: 0.5em 0px 1em; LINE-HEIGHT: 1.44">One of the many remaining questions about the Windows 7 Upgrade media is how, exactly, a clean install will work with this version of the OS. On the Microsoft Store, the company simply <a style="COLOR: blue; TEXT-DECORATION: none" title="http://store.microsoft.com/microsoft/Windows-Windows-7/category/102" href="http://store.microsoft.com/microsoft/Windows-Windows-7/category/102" target="_blank">notes</a> the following:</p> 
 
 
<p style="MARGIN: 0.5em 0px 1em; LINE-HEIGHT: 1.44">If you have Windows Vista, you can purchase Windows 7 Upgrade versions. You can</p></div> <a href="http://blog.buylearnfix.com/windows/clean-install-with-windows-7-upgrade-media-how-does-that-work-exactly/">Continue reading Clean install with Windows 7 Upgrade media: How does that work exactly?</a>]]></description>
			<content:encoded><![CDATA[<style type="text/css">
	table.dptable {
	width:100%;
	border:0;
}
tr.dphead {
	background-color:#003366;
	color:#FFFFFF;
	font-weight:bold;
}
tr.dphead td a {
	color:#FFFFFF;
}
tr.dprow {
	background-color:#FFFFFF;
}
tr.dprowalt {
	background-color:#CCCCCC;
}
#dpcols-contact {
	text-align:center;
}
#intro {
}	</style><div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.buylearnfix.com%2Fwindows%2Fclean-install-with-windows-7-upgrade-media-how-does-that-work-exactly%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.buylearnfix.com%2Fwindows%2Fclean-install-with-windows-7-upgrade-media-how-does-that-work-exactly%2F" height="61" width="51" title="Clean install with Windows 7 Upgrade media: How does that work exactly?" alt=" Clean install with Windows 7 Upgrade media: How does that work exactly?" /></a></div><div>
<p style="MARGIN: 0.5em 0px 1em; LINE-HEIGHT: 1.44">One of the many remaining questions about the Windows 7 Upgrade media is how, exactly, a clean install will work with this version of the OS. On the Microsoft Store, the company simply <a style="COLOR: blue; TEXT-DECORATION: none" title="http://store.microsoft.com/microsoft/Windows-Windows-7/category/102" href="http://store.microsoft.com/microsoft/Windows-Windows-7/category/102" target="_blank">notes</a> the following:</p>
<blockquote>
<p style="MARGIN: 0.5em 0px 1em; LINE-HEIGHT: 1.44">If you have <strong>Windows Vista</strong>, you can purchase Windows 7 Upgrade versions. You can do a clean install (back up your files, clean install, and reinstall your applications) or an in-place upgrade (Windows 7 installs over Windows Vista).</p>
<p style="MARGIN: 0.5em 0px 1em; LINE-HEIGHT: 1.44">If you have <strong>Windows XP</strong> or <strong>Windows 2000</strong>, you can purchase Windows 7 Upgrade versions. But you must back up your files, clean install, and reinstall your applications.</p>
</blockquote>
<p style="MARGIN: 0.5em 0px 1em; LINE-HEIGHT: 1.44">OK, but what does &#8220;clean install&#8221; mean exactly? And how does the Windows 7 Setup routine ensure that you have a qualifying previous version of Windows before allowing the clean install? Thanks to an email from Chris P., we have the following info from Microsoft (emphasis mine):</p>
<blockquote>
<p style="MARGIN: 0.5em 0px 1em; LINE-HEIGHT: 1.44">In order to install the upgrade version of Windows 7, you must have a qualifying Windows operating system installed and activated.  <strong>You cannot install an upgrade version of Windows 7 on a blank hard drive.</strong> The installation procedure does not ask you to insert a Windows disc in the drive for verification, the actual qualifying operating system must be installed.</p>
<p style="MARGIN: 0.5em 0px 1em; LINE-HEIGHT: 1.44">If you do not have a qualifying Windows operating system installed with a genuine license activated, then you cannot use the upgrade version of Windows 7 &#8211; you would need a &#8220;full version&#8221; Windows 7 license.</p>
<p style="MARGIN: 0.5em 0px 1em; LINE-HEIGHT: 1.44"><strong>In summary:</strong></p>
<ol>
<li style="MARGIN: 0px 0px 0px 4em; LINE-HEIGHT: 1.44"><strong>A qualifying Windows operating system must be installed.</strong></li>
<li style="MARGIN: 0px 0px 0px 4em; LINE-HEIGHT: 1.44"><strong>The qualifying Windows operating system must have a genuine license (product key) and it must be activated.</strong></li>
<li style="MARGIN: 0px 0px 0px 4em; LINE-HEIGHT: 1.44"><strong>To upgrade, boot to the qualifying Windows desktop, insert the Windows 7 Upgrade disc in the DVD drive.</strong></li>
<li style="MARGIN: 0px 0px 0px 4em; LINE-HEIGHT: 1.44"><strong>When the setup menu appears, select Custom (advanced) to initiate a clean install procedure.</strong></li>
</ol>
</blockquote>
</div>
<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.buylearnfix.com%2Fwindows%2Fclean-install-with-windows-7-upgrade-media-how-does-that-work-exactly%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.buylearnfix.com%2Fwindows%2Fclean-install-with-windows-7-upgrade-media-how-does-that-work-exactly%2F" height="61" width="51" title="Clean install with Windows 7 Upgrade media: How does that work exactly?" alt=" Clean install with Windows 7 Upgrade media: How does that work exactly?" /></a></div><img src="http://blog.buylearnfix.com/?ak_action=api_record_view&id=92&type=feed" alt=" Clean install with Windows 7 Upgrade media: How does that work exactly?"  title="Clean install with Windows 7 Upgrade media: How does that work exactly?" /><img src="http://feeds.feedburner.com/~r/BuyLearnFix/~4/8vFKMAUQJhQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.buylearnfix.com/windows/clean-install-with-windows-7-upgrade-media-how-does-that-work-exactly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.buylearnfix.com/windows/clean-install-with-windows-7-upgrade-media-how-does-that-work-exactly/</feedburner:origLink></item>
		<item>
		<title>Adding a startup script to your linux system to run at reboot or startup</title>
		<link>http://feedproxy.google.com/~r/BuyLearnFix/~3/Ni0l6GVpuAc/</link>
		<comments>http://blog.buylearnfix.com/linux/adding-a-startup-script-to-your-linux-system-to-run-at-reboot-or-startup/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 16:02:18 +0000</pubDate>
		<dc:creator>techsrx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://blog.buylearnfix.com/?p=88</guid>
		<description><![CDATA[<style type="text/css">
	table.dptable {
	width:100%;
	border:0;
}
tr.dphead {
	background-color:#003366;
	color:#FFFFFF;
	font-weight:bold;
}
tr.dphead td a {
	color:#FFFFFF;
}
tr.dprow {
	background-color:#FFFFFF;
}
tr.dprowalt {
	background-color:#CCCCCC;
}
#dpcols-contact {
	text-align:center;
}
#intro {
}	</style>This is probably what most Linux administrators would say is very easy or one of the simplest things to preform. I manage to have to back and look it up every time so I thought it would be helpful to someone to post it. So here it is in all its glory. 
 
Type in 
echo '/path/to/startup/script.sh start' >> /etc/rc.local 
 
If you have better or other ways of accomplishing <a href="http://blog.buylearnfix.com/linux/adding-a-startup-script-to-your-linux-system-to-run-at-reboot-or-startup/">Continue reading Adding a startup script to your linux system to run at reboot or startup</a>]]></description>
			<content:encoded><![CDATA[<style type="text/css">
	table.dptable {
	width:100%;
	border:0;
}
tr.dphead {
	background-color:#003366;
	color:#FFFFFF;
	font-weight:bold;
}
tr.dphead td a {
	color:#FFFFFF;
}
tr.dprow {
	background-color:#FFFFFF;
}
tr.dprowalt {
	background-color:#CCCCCC;
}
#dpcols-contact {
	text-align:center;
}
#intro {
}	</style><div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.buylearnfix.com%2Flinux%2Fadding-a-startup-script-to-your-linux-system-to-run-at-reboot-or-startup%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.buylearnfix.com%2Flinux%2Fadding-a-startup-script-to-your-linux-system-to-run-at-reboot-or-startup%2F" height="61" width="51" title="Adding a startup script to your linux system to run at reboot or startup" alt=" Adding a startup script to your linux system to run at reboot or startup" /></a></div><p>This is probably what most Linux administrators would say is very easy or one of the simplest things to preform. I manage to have to back and look it up every time so I thought it would be helpful to someone to post it. So here it is in all its glory. </p>
<p>Type in<br />
<code>echo '/path/to/startup/script.sh start' >> /etc/rc.local</code></p>
<p>If you have better or other ways of accomplishing the same please share.</p>
<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.buylearnfix.com%2Flinux%2Fadding-a-startup-script-to-your-linux-system-to-run-at-reboot-or-startup%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.buylearnfix.com%2Flinux%2Fadding-a-startup-script-to-your-linux-system-to-run-at-reboot-or-startup%2F" height="61" width="51" title="Adding a startup script to your linux system to run at reboot or startup" alt=" Adding a startup script to your linux system to run at reboot or startup" /></a></div><img src="http://blog.buylearnfix.com/?ak_action=api_record_view&id=88&type=feed" alt=" Adding a startup script to your linux system to run at reboot or startup"  title="Adding a startup script to your linux system to run at reboot or startup" /><img src="http://feeds.feedburner.com/~r/BuyLearnFix/~4/Ni0l6GVpuAc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.buylearnfix.com/linux/adding-a-startup-script-to-your-linux-system-to-run-at-reboot-or-startup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.buylearnfix.com/linux/adding-a-startup-script-to-your-linux-system-to-run-at-reboot-or-startup/</feedburner:origLink></item>
		<item>
		<title>Windows batch file to check if a file has changed and if it has do something</title>
		<link>http://feedproxy.google.com/~r/BuyLearnFix/~3/wXlq64AoJA0/</link>
		<comments>http://blog.buylearnfix.com/windows/windows-batch-file-to-check-if-a-file-has-changed-and-if-it-has-do-something/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 19:30:38 +0000</pubDate>
		<dc:creator>techsrx</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[.bat]]></category>
		<category><![CDATA[batch files]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[shell scripting]]></category>

		<guid isPermaLink="false">http://blog.buylearnfix.com/linux/windows-batch-file-to-check-if-a-file-has-changed-and-if-it-has-do-something/</guid>
		<description><![CDATA[<style type="text/css">
	table.dptable {
	width:100%;
	border:0;
}
tr.dphead {
	background-color:#003366;
	color:#FFFFFF;
	font-weight:bold;
}
tr.dphead td a {
	color:#FFFFFF;
}
tr.dprow {
	background-color:#FFFFFF;
}
tr.dprowalt {
	background-color:#CCCCCC;
}
#dpcols-contact {
	text-align:center;
}
#intro {
}	</style>I needed a Windows batch file to check if a file has changed and if it has do something. 
What I was trying to accomplish is I have a file written to the c:\ drive by a web application as users interact with it. 
It rewrites the file every couple of minutes or so. When the file is rewritten I want it to display the content to the window or <a href="http://blog.buylearnfix.com/windows/windows-batch-file-to-check-if-a-file-has-changed-and-if-it-has-do-something/">Continue reading Windows batch file to check if a file has changed and if it has do something</a>]]></description>
			<content:encoded><![CDATA[<style type="text/css">
	table.dptable {
	width:100%;
	border:0;
}
tr.dphead {
	background-color:#003366;
	color:#FFFFFF;
	font-weight:bold;
}
tr.dphead td a {
	color:#FFFFFF;
}
tr.dprow {
	background-color:#FFFFFF;
}
tr.dprowalt {
	background-color:#CCCCCC;
}
#dpcols-contact {
	text-align:center;
}
#intro {
}	</style><div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.buylearnfix.com%2Fwindows%2Fwindows-batch-file-to-check-if-a-file-has-changed-and-if-it-has-do-something%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.buylearnfix.com%2Fwindows%2Fwindows-batch-file-to-check-if-a-file-has-changed-and-if-it-has-do-something%2F" height="61" width="51" title="Windows batch file to check if a file has changed and if it has do something" alt=" Windows batch file to check if a file has changed and if it has do something" /></a></div><p>I needed a Windows batch file to check if a file has changed and if it has do something.<br />
What I was trying to accomplish is I have a file written to the c:\ drive by a web application as users interact with it.<br />
It rewrites the file every couple of minutes or so. When the file is rewritten I want it to display the content to the window or log it into a file.<br />
I didn&#8217;t want to display it or log it unless the info has actually changed.</p>
<p>Here was some advice I got</p>
<p>You can check if a file has changed quite easily using the archive bit:</p>
<p><code>dir /b /aa whatever.txt</code></p>
<p>Does that report your file as changed?</p>
<p>then do</p>
<p><code>attrib -a whatever.txt</code><br />
and<br />
<code>dir /b /aa whatever.txt </code><br />
will not find it until it has changed again</p>
<p>OR you could use xcopy.  </p>
<p>1. if it uses xcopy /M then it will copy if the file has changed and reset the<br />
archive bit for you.<br />
2. Use /d and it will copy the file if newer.</p>
<p>For the xcopy way</p>
<p><code>@echo off<br />
:start<br />
del "%temp%\file.txt"<br />
xcopy /M C:\file.txt "%temp%"<br />
if exist "%temp%\file.txt" echo File has changed<br />
ping 127.0.0.1 -n 5<br />
goto start</code></p>
<p>or</p>
<p><code>@echo off<br />
:start<br />
xcopy /Y /D C:\file.txt "%temp%" | find /i "1 File(s) copied" &#038;&#038; echo File has changed<br />
ping 127.0.0.1 -n 5<br />
goto start</code></p>
<p>To get rid of the &#8221; 1 files copied&#8221; message on the screen with the last one:</p>
<p><code>@echo off<br />
:start<br />
xcopy /Y /D C:\file.txt "%temp%" | find /i "1 File(s) copied" >NUL &#038;&#038; echo File has changed<br />
ping 127.0.0.1 -n 5<br />
goto start</code></p>
<p>How big is this file though?</p>
<p><code>@echo off<br />
dir /aa /b c:\file.txt >NUL 2>&#038;1 &#038;&#038; echo Has changed &#038; attrib -a c:\file.txt</code></p>
<p>Here was some more advice given</p>
<p><code>:loop<br />
   dir /aa c:\file.txt >nul 2>&#038;1<br />
   if %errorlevel% equ 0 (<br />
      attrib -a c:\file.txt<br />
      ::File has changed. Do something<br />
   )</p>
<p>   ping -n 5 localhost >nul 2>&#038;1<br />
goto loop</code></p>
<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.buylearnfix.com%2Fwindows%2Fwindows-batch-file-to-check-if-a-file-has-changed-and-if-it-has-do-something%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.buylearnfix.com%2Fwindows%2Fwindows-batch-file-to-check-if-a-file-has-changed-and-if-it-has-do-something%2F" height="61" width="51" title="Windows batch file to check if a file has changed and if it has do something" alt=" Windows batch file to check if a file has changed and if it has do something" /></a></div><img src="http://blog.buylearnfix.com/?ak_action=api_record_view&id=81&type=feed" alt=" Windows batch file to check if a file has changed and if it has do something"  title="Windows batch file to check if a file has changed and if it has do something" /><img src="http://feeds.feedburner.com/~r/BuyLearnFix/~4/wXlq64AoJA0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.buylearnfix.com/windows/windows-batch-file-to-check-if-a-file-has-changed-and-if-it-has-do-something/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.buylearnfix.com/windows/windows-batch-file-to-check-if-a-file-has-changed-and-if-it-has-do-something/</feedburner:origLink></item>
	</channel>
</rss><!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->

