<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>satishgaudo.com</title>
	<atom:link href="http://satishgaudo.com/satblog/feed/" rel="self" type="application/rss+xml" />
	<link>http://satishgaudo.com/satblog</link>
	<description>Understanding technology</description>
	<lastBuildDate>Sat, 30 Jan 2010 07:31:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Linux commands</title>
		<link>http://satishgaudo.com/satblog/2010/01/30/linux-commands/</link>
		<comments>http://satishgaudo.com/satblog/2010/01/30/linux-commands/#comments</comments>
		<pubDate>Sat, 30 Jan 2010 07:22:18 +0000</pubDate>
		<dc:creator>satishgaudo</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://satishgaudo.com/satblog/?p=143</guid>
		<description><![CDATA[
			
				
			
		
sed -i &#8217;s/abc/xyz/g&#8217; *.php
This command is used for mass replacemet using regular expression.
In the above command &#8220;abc&#8221; is replace with &#8220;xyz&#8221; from all the files extension &#8220;php&#8221;.
find /var/www/html/sch_admin/ -mtime -1
This command is used to list all the files within the specified folder,say &#8220;var/www/html/sch_admin/&#8221;, which have been created or modified within the period specified,say &#8220;-1&#8243; which [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fsatishgaudo.com%2Fsatblog%2F2010%2F01%2F30%2Flinux-commands%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fsatishgaudo.com%2Fsatblog%2F2010%2F01%2F30%2Flinux-commands%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><strong>sed -i &#8217;s/abc/xyz/g&#8217; *.php</strong><br />
This command is used for mass replacemet using regular expression.<br />
In the above command &#8220;abc&#8221; is replace with &#8220;xyz&#8221; from all the files extension &#8220;php&#8221;.</p>
<p><strong>find /var/www/html/sch_admin/ -mtime -1</strong></p>
<p>This command is used to list all the files within the specified folder,say &#8220;var/www/html/sch_admin/&#8221;, which have been created or modified within the period specified,say &#8220;-1&#8243; which is last one day.</p>
<p><strong>tar xvzf pig-0.5.0.tar.gz</strong><br />
untar the tar.gz file</p>
<p>Add /pig-n.n.n/bin to your path. Use export (bash,sh,ksh) or setenv (tcsh,csh). For example:<br />
<strong> export PATH=/root/pig-0.5.0/bin:$PATH</strong></p>
<p>Set JAVA_HOME as follows using syntax export JAVA_HOME=
<path-to-java>.<br />
If your path is set to /usr/java/jdk1.5.0_07/bin/java, set it as follows:<br />
<strong>export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre</strong></p>
<p>Tip: Use the following command to find out exact path to which java executable under UNIX / Linux:<br />
<strong>$ which java</strong></p>
<p>* export command is used to set environment variable relevant on during the current session</p>
<p>For permanent setup &#8211; edit .bash_profile &#8211; as it get all the vars set on login</p>
<p><strong>vi ~/.bash_profile</strong><br />
<strong>export JAVA_HOME=/usr</strong><br />
<strong>export PATH=/root/pig-0.5.0/bin:$PATH</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://satishgaudo.com/satblog/2010/01/30/linux-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Export the query result in a temporary file</title>
		<link>http://satishgaudo.com/satblog/2010/01/20/export-the-query-result-in-a-temporary-file/</link>
		<comments>http://satishgaudo.com/satblog/2010/01/20/export-the-query-result-in-a-temporary-file/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 09:16:51 +0000</pubDate>
		<dc:creator>satishgaudo</dc:creator>
				<category><![CDATA[Mysql]]></category>

		<guid isPermaLink="false">http://satishgaudo.com/satblog/?p=134</guid>
		<description><![CDATA[
			
				
			
		
select video_file from videos INTO OUTFILE &#8216;/tmp/video1.txt&#8217;;
Query Above exports all the rows for coulmn video_file into a text file &#8220;/tmp/video1.txt&#8221; . 
]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fsatishgaudo.com%2Fsatblog%2F2010%2F01%2F20%2Fexport-the-query-result-in-a-temporary-file%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fsatishgaudo.com%2Fsatblog%2F2010%2F01%2F20%2Fexport-the-query-result-in-a-temporary-file%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>select video_file from videos INTO OUTFILE &#8216;/tmp/video1.txt&#8217;;</p>
<p>Query Above exports all the rows for coulmn video_file into a text file &#8220;/tmp/video1.txt&#8221; . </p>
]]></content:encoded>
			<wfw:commentRss>http://satishgaudo.com/satblog/2010/01/20/export-the-query-result-in-a-temporary-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>100-year old building collapses at dockyard road &#8211; Mumbai,India</title>
		<link>http://satishgaudo.com/satblog/2010/01/13/100-year-old-building-collapses-at-dockyard-road-mumbaiindia/</link>
		<comments>http://satishgaudo.com/satblog/2010/01/13/100-year-old-building-collapses-at-dockyard-road-mumbaiindia/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 12:33:47 +0000</pubDate>
		<dc:creator>satishgaudo</dc:creator>
				<category><![CDATA[My Videos]]></category>
		<category><![CDATA[building collapse at south mumbai]]></category>
		<category><![CDATA[Dockyard road mumbai]]></category>
		<category><![CDATA[india]]></category>
		<category><![CDATA[mumbai]]></category>
		<category><![CDATA[people collecting belongings from building debris from mumbai collapsed building]]></category>
		<category><![CDATA[satishgaudo]]></category>
		<category><![CDATA[south mumbai]]></category>

		<guid isPermaLink="false">http://satishgaudo.com/satblog/?p=130</guid>
		<description><![CDATA[The evacuation of the 75 families who used to stay in the building was done in time otherwise there would have been many casualties. The five storied Reay building opposite the Dockyard railway station in Mumbai was more than 100 years old and notice had already been given for its evacuation. Residents picking their belongings from the debris ]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fsatishgaudo.com%2Fsatblog%2F2010%2F01%2F13%2F100-year-old-building-collapses-at-dockyard-road-mumbaiindia%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fsatishgaudo.com%2Fsatblog%2F2010%2F01%2F13%2F100-year-old-building-collapses-at-dockyard-road-mumbaiindia%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><code></p>
<p style="border: 1px solid #DDDDDD;background-color:#dcdcdc;">
<!-- Smart Youtube --><span class="youtube"><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/I0DF4OcaHOo&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=&amp;fs=1&amp;hl=en&amp;autoplay=&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" /><param name="allowFullScreen" value="true" /><embed wmode="transparent" src="http://www.youtube.com/v/I0DF4OcaHOo&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=&amp;fs=1&amp;hl=en&amp;autoplay=&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="355" ></embed><param name="wmode" value="transparent" /></object></span>
</p>
<p>The evacuation of the 75 families who used to stay in the building was done in time otherwise there would have been many casualties. The five storied Reay building opposite the Dockyard railway station in Mumbai was more than 100 years old and notice had already been given for its evacuation. Residents picking their belongings from the debris<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://satishgaudo.com/satblog/2010/01/13/100-year-old-building-collapses-at-dockyard-road-mumbaiindia/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTTP: Persistent connections</title>
		<link>http://satishgaudo.com/satblog/2010/01/08/http-persistent-connections/</link>
		<comments>http://satishgaudo.com/satblog/2010/01/08/http-persistent-connections/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 11:38:03 +0000</pubDate>
		<dc:creator>satishgaudo</dc:creator>
				<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://satishgaudo.com/satblog/?p=127</guid>
		<description><![CDATA[
			
				
			
		
In HTTP/0.9 and 1.0, the connection is closed after a single request/response pair. In HTTP/1.1 a keep-alive-mechanism was introduced, where a connection could be reused for more than one request.
Such persistent connections reduce lag perceptibly, because the client does not need to re-negotiate the TCP connection after the first request has been sent.
Version 1.1 of [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fsatishgaudo.com%2Fsatblog%2F2010%2F01%2F08%2Fhttp-persistent-connections%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fsatishgaudo.com%2Fsatblog%2F2010%2F01%2F08%2Fhttp-persistent-connections%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>In HTTP/0.9 and 1.0, the connection is closed after a single request/response pair. In HTTP/1.1 a keep-alive-mechanism was introduced, where a connection could be reused for more than one request.</p>
<p>Such persistent connections reduce lag perceptibly, because the client does not need to re-negotiate the TCP connection after the first request has been sent.</p>
<p>Version 1.1 of the protocol made bandwidth optimization improvements to HTTP/1.0. For example, HTTP/1.1 introduced chunked transfer encoding to allow content on persistent connections to be streamed, rather than buffered. HTTP pipelining further reduces lag time, allowing clients to send multiple requests before a previous response has been received to the first one. Another improvement to the protocol was byte serving, which is when a server transmits just the portion of a resource explicitly requested by a client.</p>
<p>Reference URL: <a href="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol">http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol</a></p>
]]></content:encoded>
			<wfw:commentRss>http://satishgaudo.com/satblog/2010/01/08/http-persistent-connections/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>shell script to back up database and script folders</title>
		<link>http://satishgaudo.com/satblog/2009/10/27/shell-script-to-back-up-database-and-script-folders/</link>
		<comments>http://satishgaudo.com/satblog/2009/10/27/shell-script-to-back-up-database-and-script-folders/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 07:00:06 +0000</pubDate>
		<dc:creator>satishgaudo</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://satishgaudo.com/satblog/?p=124</guid>
		<description><![CDATA[
			
				
			
		
#!/bin/bash
cd /ct20/uploads/backup/
NOW=$(date +&#8221;%m-%d-%Y&#8221;)
tar -cjf backupsite_$NOW.bz2 /opt/www/ct20
tar -cjf backupcms_$NOW.bz2 /opt/www/cms
tar -cjf mysqlbackup_$NOW.bz2 /opt/lib/mysql 
]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fsatishgaudo.com%2Fsatblog%2F2009%2F10%2F27%2Fshell-script-to-back-up-database-and-script-folders%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fsatishgaudo.com%2Fsatblog%2F2009%2F10%2F27%2Fshell-script-to-back-up-database-and-script-folders%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>#!/bin/bash<br />
cd /ct20/uploads/backup/<br />
NOW=$(date +&#8221;%m-%d-%Y&#8221;)<br />
tar -cjf backupsite_$NOW.bz2 /opt/www/ct20<br />
tar -cjf backupcms_$NOW.bz2 /opt/www/cms<br />
tar -cjf mysqlbackup_$NOW.bz2 /opt/lib/mysql </p>
]]></content:encoded>
			<wfw:commentRss>http://satishgaudo.com/satblog/2009/10/27/shell-script-to-back-up-database-and-script-folders/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>shell script to optimize database</title>
		<link>http://satishgaudo.com/satblog/2009/10/27/shell-script-to-optimize-database/</link>
		<comments>http://satishgaudo.com/satblog/2009/10/27/shell-script-to-optimize-database/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 06:57:24 +0000</pubDate>
		<dc:creator>satishgaudo</dc:creator>
				<category><![CDATA[Mysql]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://satishgaudo.com/satblog/?p=122</guid>
		<description><![CDATA[
			
				
			
		
DB_LIST=&#8221;$(mysql -u root  -Bse &#8217;show databases&#8217; &#124; egrep -v &#8216;information_schema&#124;mysql&#124;test&#8217;)&#8221;
for db in ${DB_LIST[@]}
do
TABLENAMES=&#8221;$(mysql -u root  $db -Bse &#8217;show tables&#8217;)&#8221;
echo &#8220;Database: &#8220;$db
for TABLENAME in ${TABLENAMES[@]}
do
mysql -u root $db -Bse &#8220;optimize TABLE $TABLENAME;&#8221;
echo $TABLENAME&#8221; table has been optimized&#8221;
done
echo $db &#8211; $TABLENAME &#8220;Optimized has been completed&#8221;
done
echo &#8220;All Databases have been successfully Optimized&#8221;
]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fsatishgaudo.com%2Fsatblog%2F2009%2F10%2F27%2Fshell-script-to-optimize-database%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fsatishgaudo.com%2Fsatblog%2F2009%2F10%2F27%2Fshell-script-to-optimize-database%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>DB_LIST=&#8221;$(mysql -u root  -Bse &#8217;show databases&#8217; | egrep -v &#8216;information_schema|mysql|test&#8217;)&#8221;<br />
for db in ${DB_LIST[@]}<br />
do<br />
TABLENAMES=&#8221;$(mysql -u root  $db -Bse &#8217;show tables&#8217;)&#8221;<br />
echo &#8220;Database: &#8220;$db<br />
for TABLENAME in ${TABLENAMES[@]}<br />
do<br />
mysql -u root $db -Bse &#8220;optimize TABLE $TABLENAME;&#8221;<br />
echo $TABLENAME&#8221; table has been optimized&#8221;<br />
done<br />
echo $db &#8211; $TABLENAME &#8220;Optimized has been completed&#8221;<br />
done<br />
echo &#8220;All Databases have been successfully Optimized&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://satishgaudo.com/satblog/2009/10/27/shell-script-to-optimize-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>shell script to Analyze database</title>
		<link>http://satishgaudo.com/satblog/2009/10/27/shell-script-to-analyze-database/</link>
		<comments>http://satishgaudo.com/satblog/2009/10/27/shell-script-to-analyze-database/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 06:56:21 +0000</pubDate>
		<dc:creator>satishgaudo</dc:creator>
				<category><![CDATA[Mysql]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://satishgaudo.com/satblog/?p=120</guid>
		<description><![CDATA[
			
				
			
		
DB_LIST=&#8221;$(mysql -u root  -Bse &#8217;show databases&#8217; &#124; egrep -v &#8216;information_schema&#124;mysql&#124;test&#8217;)&#8221;
for db in ${DB_LIST[@]}
do
TABLENAMES=&#8221;$(mysql -u root   $db -Bse &#8217;show tables&#8217;)&#8221;
echo &#8220;Database: &#8220;$db
for TABLENAME in ${TABLENAMES[@]}
do
mysql -u root $db -Bse &#8220;Analyze TABLE $TABLENAME;&#8221;
echo $TABLENAME &#8220;Analyze has been done&#8221;
done
echo $db &#8211; $TABLENAME &#8220;Analyzis has been completed&#8221;
done
echo &#8220;All Databases have been successfully Optimized&#8221;
]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fsatishgaudo.com%2Fsatblog%2F2009%2F10%2F27%2Fshell-script-to-analyze-database%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fsatishgaudo.com%2Fsatblog%2F2009%2F10%2F27%2Fshell-script-to-analyze-database%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>DB_LIST=&#8221;$(mysql -u root  -Bse &#8217;show databases&#8217; | egrep -v &#8216;information_schema|mysql|test&#8217;)&#8221;<br />
for db in ${DB_LIST[@]}<br />
do<br />
TABLENAMES=&#8221;$(mysql -u root   $db -Bse &#8217;show tables&#8217;)&#8221;<br />
echo &#8220;Database: &#8220;$db<br />
for TABLENAME in ${TABLENAMES[@]}<br />
do<br />
mysql -u root $db -Bse &#8220;Analyze TABLE $TABLENAME;&#8221;<br />
echo $TABLENAME &#8220;Analyze has been done&#8221;<br />
done<br />
echo $db &#8211; $TABLENAME &#8220;Analyzis has been completed&#8221;<br />
done<br />
echo &#8220;All Databases have been successfully Optimized&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://satishgaudo.com/satblog/2009/10/27/shell-script-to-analyze-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>glob — Find pathnames matching a pattern</title>
		<link>http://satishgaudo.com/satblog/2009/10/27/glob-%e2%80%94-find-pathnames-matching-a-pattern/</link>
		<comments>http://satishgaudo.com/satblog/2009/10/27/glob-%e2%80%94-find-pathnames-matching-a-pattern/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 06:54:12 +0000</pubDate>
		<dc:creator>satishgaudo</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://satishgaudo.com/satblog/?p=118</guid>
		<description><![CDATA[
			
				
			
		
$aDir = glob(&#8221;/clt20/uploads/videos/*.flv&#8221;);
The glob() function searches for all the pathnames matching pattern  according to the rules used by the libc glob() function, which is similar to the rules used by common shells. 
]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fsatishgaudo.com%2Fsatblog%2F2009%2F10%2F27%2Fglob-%25e2%2580%2594-find-pathnames-matching-a-pattern%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fsatishgaudo.com%2Fsatblog%2F2009%2F10%2F27%2Fglob-%25e2%2580%2594-find-pathnames-matching-a-pattern%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>$aDir = glob(&#8221;/clt20/uploads/videos/*.flv&#8221;);</p>
<p>The glob() function searches for all the pathnames matching pattern  according to the rules used by the libc glob() function, which is similar to the rules used by common shells. </p>
]]></content:encoded>
			<wfw:commentRss>http://satishgaudo.com/satblog/2009/10/27/glob-%e2%80%94-find-pathnames-matching-a-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>shell script to rotate logs between remote servers</title>
		<link>http://satishgaudo.com/satblog/2009/10/27/shell-script-to-rotate-logs-between-remote-servers/</link>
		<comments>http://satishgaudo.com/satblog/2009/10/27/shell-script-to-rotate-logs-between-remote-servers/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 06:47:42 +0000</pubDate>
		<dc:creator>satishgaudo</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://satishgaudo.com/satblog/?p=116</guid>
		<description><![CDATA[
			
				
			
		
cd /var/log/httpd
NOW=$(date +&#8221;%m-%d-%Y&#8221;)
mv  mobile-error_log mobile-error_log-$NOW
mv  mobile-access_log mobile-access_log-$NOW
/etc/init.d/httpd graceful
sleep 5
tar -cvjf /opt/logbackup/logs-$NOW.bz2  mobile-error_log-$NOW mobile-access_log-$NOW
scp mobile-access_log-$NOW domU-12-31-39-07-75-63:/clt20/uploads/mobilelog/
rm -f mobile-error_log-$NOW mobile-access_log-$NOW
Remember we have exchanged the authentication key between the two servers.
]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fsatishgaudo.com%2Fsatblog%2F2009%2F10%2F27%2Fshell-script-to-rotate-logs-between-remote-servers%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fsatishgaudo.com%2Fsatblog%2F2009%2F10%2F27%2Fshell-script-to-rotate-logs-between-remote-servers%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>cd /var/log/httpd<br />
NOW=$(date +&#8221;%m-%d-%Y&#8221;)<br />
mv  mobile-error_log mobile-error_log-$NOW<br />
mv  mobile-access_log mobile-access_log-$NOW<br />
/etc/init.d/httpd graceful<br />
sleep 5<br />
tar -cvjf /opt/logbackup/logs-$NOW.bz2  mobile-error_log-$NOW mobile-access_log-$NOW<br />
scp mobile-access_log-$NOW domU-12-31-39-07-75-63:/clt20/uploads/mobilelog/<br />
rm -f mobile-error_log-$NOW mobile-access_log-$NOW</p>
<p>Remember we have exchanged the authentication key between the two servers.</p>
]]></content:encoded>
			<wfw:commentRss>http://satishgaudo.com/satblog/2009/10/27/shell-script-to-rotate-logs-between-remote-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux rsync command</title>
		<link>http://satishgaudo.com/satblog/2009/10/21/linux-rsync-command/</link>
		<comments>http://satishgaudo.com/satblog/2009/10/21/linux-rsync-command/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 14:41:17 +0000</pubDate>
		<dc:creator>satishgaudo</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[rsync]]></category>

		<guid isPermaLink="false">http://satishgaudo.com/satblog/?p=112</guid>
		<description><![CDATA[
			
				
			
		
Following command is used for remote syncing of a folder on two remote servers:
/usr/local/bin/rsync -avz -e ssh /opt/www/cms/imagedata/2009/oct/ webdoc@domU-12-31-39-03-09-20:/opt/www/clt20/imagedata/2009/oct/
To rsync a particular file use:
/usr/local/bin/rsync -avz -e ssh /opt/www/clt20/rss.xml webdoc@domU-12-31-39-03-09-20:/opt/www/clt20/
]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fsatishgaudo.com%2Fsatblog%2F2009%2F10%2F21%2Flinux-rsync-command%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fsatishgaudo.com%2Fsatblog%2F2009%2F10%2F21%2Flinux-rsync-command%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Following command is used for remote syncing of a folder on two remote servers:</p>
<p>/usr/local/bin/rsync -avz -e ssh /opt/www/cms/imagedata/2009/oct/ webdoc@domU-12-31-39-03-09-20:/opt/www/clt20/imagedata/2009/oct/</p>
<p>To rsync a particular file use:</p>
<p>/usr/local/bin/rsync -avz -e ssh /opt/www/clt20/rss.xml webdoc@domU-12-31-39-03-09-20:/opt/www/clt20/</p>
]]></content:encoded>
			<wfw:commentRss>http://satishgaudo.com/satblog/2009/10/21/linux-rsync-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
