<?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>vGrup  Blog &#187; bash</title>
	<atom:link href="http://www.vgrup.com/tag/bash/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.vgrup.com</link>
	<description>Vgrup for Geek and Robot Unix Party</description>
	<lastBuildDate>Thu, 24 Nov 2011 13:24:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>oracle tns listener kilitlendiğinde yeniden başlatmak için basit bir script</title>
		<link>http://www.vgrup.com/2010/02/22/oracle-tns-listener-kilitlendiginde-kapatmak-icin-basit-bir-script/</link>
		<comments>http://www.vgrup.com/2010/02/22/oracle-tns-listener-kilitlendiginde-kapatmak-icin-basit-bir-script/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 15:33:29 +0000</pubDate>
		<dc:creator>İsmail ÇAKIR</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[force listener to restart]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[lsnrctl]]></category>
		<category><![CDATA[tnslsnr]]></category>

		<guid isPermaLink="false">http://www.vgrup.com/?p=286</guid>
		<description><![CDATA[Hani böylesine zorla yapmak istemeyizde mecbur kalınca, niye olmasın lsnrctl stop komutuyla durmuyorsa. #!/bin/bash for ind in `ps -aef &#124; grep tnslsnr &#124; grep -v grep &#124; cut -f4 -d ' '` do kill -9 $ind echo "process $ind" done if [ $? -eq 0 ]; then lsnrctl start fi exit Tags: bash, force listener [...]]]></description>
			<content:encoded><![CDATA[<p>Hani böylesine zorla yapmak istemeyizde mecbur kalınca, niye olmasın <img src='http://www.vgrup.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<code><a href="http://www.vgrup.com/tag/lsnrctl/" class="st_tag internal_tag" rel="tag" title="Posts tagged with lsnrctl">lsnrctl</a> stop </code><br />
komutuyla durmuyorsa.<br />
<code>#!/bin/<a href="http://www.vgrup.com/tag/bash/" class="st_tag internal_tag" rel="tag" title="Posts tagged with bash">bash</a></p>
<p>for ind in `ps -aef | grep <a href="http://www.vgrup.com/tag/tnslsnr/" class="st_tag internal_tag" rel="tag" title="Posts tagged with tnslsnr">tnslsnr</a> | grep -v grep | cut -f4 -d ' '`<br />
do<br />
 kill -9 $ind<br />
  echo "process $ind"<br />
done<br />
if [ $? -eq 0 ]; then<br />
lsnrctl start<br />
fi<br />
exit</code></p>
<div><a class="addthis_button" href="//addthis.com/bookmark.php?v=250" addthis:url='http://www.vgrup.com/2010/02/22/oracle-tns-listener-kilitlendiginde-kapatmak-icin-basit-bir-script/' addthis:title='oracle tns listener kilitlendiğinde yeniden başlatmak için basit bir script'><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>
	Tags: <a href="http://www.vgrup.com/tag/bash/" title="bash" rel="tag">bash</a>, <a href="http://www.vgrup.com/tag/force-listener-to-restart/" title="force listener to restart" rel="tag">force listener to restart</a>, <a href="http://www.vgrup.com/tag/linux/" title="Linux" rel="tag">Linux</a>, <a href="http://www.vgrup.com/tag/lsnrctl/" title="lsnrctl" rel="tag">lsnrctl</a>, <a href="http://www.vgrup.com/tag/oracle/" title="oracle" rel="tag">oracle</a>, <a href="http://www.vgrup.com/tag/tnslsnr/" title="tnslsnr" rel="tag">tnslsnr</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.vgrup.com/2010/02/22/oracle-tns-listener-kilitlendiginde-kapatmak-icin-basit-bir-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bir dizinde aynı içerikli dosyaları bulmak için bir script</title>
		<link>http://www.vgrup.com/2010/02/18/bir-dizinde-ayni-icerikli-dosyalari-bulmak-icin-bir-script/</link>
		<comments>http://www.vgrup.com/2010/02/18/bir-dizinde-ayni-icerikli-dosyalari-bulmak-icin-bir-script/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 14:00:11 +0000</pubDate>
		<dc:creator>myownshadow</dc:creator>
				<category><![CDATA[Yazılım]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[checksum]]></category>
		<category><![CDATA[duplicate file]]></category>
		<category><![CDATA[md5]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://www.vgrup.com/?p=254</guid>
		<description><![CDATA[#!/bin/bash #dupfind.sh #author: myownshadow #TODO: #needs find redirecting without for loop (find invokes subshells) #need a faster checksum, md5sum can be very slow with big files for ind in `find $1 -type f -print0 &#124; xargs -0 md5sum &#124;sed s/\ /-/g` do echo $ind &#62;&#62; .md5list &#38;2&#62;/dev/null done cat .md5list&#124;cut -c1-32&#124; sort&#124; uniq -d &#62;&#62; [...]]]></description>
			<content:encoded><![CDATA[<p><code>#!/bin/<a href="http://www.vgrup.com/tag/bash/" class="st_tag internal_tag" rel="tag" title="Posts tagged with bash">bash</a><br />
#dupfind.sh<br />
#author: myownshadow<br />
#TODO:<br />
#needs find redirecting without for loop (find invokes subshells)<br />
#need a faster <a href="http://www.vgrup.com/tag/checksum/" class="st_tag internal_tag" rel="tag" title="Posts tagged with checksum">checksum</a>, md5sum can be very slow with big files</p>
<p>for ind in `find  $1  -type f -print0 | xargs -0 md5sum |sed s/\ /-/g`<br />
do<br />
echo  $ind  &gt;&gt; .md5list &amp;2&gt;/dev/null<br />
done<br />
cat .md5list|cut -c1-32| sort| uniq -d &gt;&gt; .duplist<br />
for line in `cat .duplist`<br />
do<br />
cat .md5list |  grep $line | cut -c35-<br />
done<br />
rm .md5list<br />
rm .duplist<br />
exit</code></p>
<p>Kullanım:<br />
<code>$dupfind.sh /media/iPOD</code></p>
<div><a class="addthis_button" href="//addthis.com/bookmark.php?v=250" addthis:url='http://www.vgrup.com/2010/02/18/bir-dizinde-ayni-icerikli-dosyalari-bulmak-icin-bir-script/' addthis:title='Bir dizinde aynı içerikli dosyaları bulmak için bir script'><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>
	Tags: <a href="http://www.vgrup.com/tag/bash/" title="bash" rel="tag">bash</a>, <a href="http://www.vgrup.com/tag/checksum/" title="checksum" rel="tag">checksum</a>, <a href="http://www.vgrup.com/tag/duplicate-file/" title="duplicate file" rel="tag">duplicate file</a>, <a href="http://www.vgrup.com/tag/md5/" title="md5" rel="tag">md5</a>, <a href="http://www.vgrup.com/tag/scripting/" title="scripting" rel="tag">scripting</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.vgrup.com/2010/02/18/bir-dizinde-ayni-icerikli-dosyalari-bulmak-icin-bir-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache için basit bir log viewer</title>
		<link>http://www.vgrup.com/2010/02/18/apache-icin-basit-bir-log-viewer/</link>
		<comments>http://www.vgrup.com/2010/02/18/apache-icin-basit-bir-log-viewer/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 13:50:19 +0000</pubDate>
		<dc:creator>myownshadow</dc:creator>
				<category><![CDATA[Yazılım]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[changelog]]></category>
		<category><![CDATA[log viewer]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[zenity]]></category>

		<guid isPermaLink="false">http://www.vgrup.com/?p=250</guid>
		<description><![CDATA[#!/bin/bash if [ ! -f /tmp/logcopy ] then echo "first run, copying log file" cp /var/log/apache2/access.log /tmp/logcopy fi oldfilehash=`md5sum /tmp/logcopy &#124; cut -d " " -f1` newfilehash=`md5sum /var/log/apache2/access.log &#124; cut -d " " -f1` if [ "$oldfilehash" != "$newfilehash" ]; then diff /var/log/apache2/access.log /tmp/logcopy &#62; /tmp/logdiff if [ ! $? -eq 0 ]; then cat [...]]]></description>
			<content:encoded><![CDATA[<p><code>#!/bin/<a href="http://www.vgrup.com/tag/bash/" class="st_tag internal_tag" rel="tag" title="Posts tagged with bash">bash</a><br />
if [ ! -f /tmp/logcopy ]<br />
then<br />
echo "first run, copying log file"<br />
cp /var/log/<a href="http://www.vgrup.com/tag/apache/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Apache">apache</a>2/access.log /tmp/logcopy<br />
fi<br />
oldfilehash=`md5sum /tmp/logcopy | cut -d " " -f1`<br />
newfilehash=`md5sum /var/log/<a href="http://www.vgrup.com/tag/apache2/" class="st_tag internal_tag" rel="tag" title="Posts tagged with apache2">apache2</a>/access.log | cut -d " " -f1`<br />
if [ "$oldfilehash" != "$newfilehash" ]; then<br />
diff /var/log/apache2/access.log /tmp/logcopy &gt; /tmp/logdiff<br />
if [ ! $? -eq 0 ]; then<br />
cat /tmp/logdiff | <a href="http://www.vgrup.com/tag/zenity/" class="st_tag internal_tag" rel="tag" title="Posts tagged with zenity">zenity</a> --title "Apache <a href="http://www.vgrup.com/tag/log-viewer/" class="st_tag internal_tag" rel="tag" title="Posts tagged with log viewer">Log Viewer</a>" --text-info --width 1024 --height 800<br />
fi<br />
cp -u /var/log/apache2/access.log /tmp/logcopy<br />
fi<br />
exit</code></p>
<p><code>/usr/local/bin</code> altına kaydedip kullanabilirsiniz.</p>
<div><a class="addthis_button" href="//addthis.com/bookmark.php?v=250" addthis:url='http://www.vgrup.com/2010/02/18/apache-icin-basit-bir-log-viewer/' addthis:title='Apache için basit bir log viewer'><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>
	Tags: <a href="http://www.vgrup.com/tag/apache/" title="Apache" rel="tag">Apache</a>, <a href="http://www.vgrup.com/tag/apache2/" title="apache2" rel="tag">apache2</a>, <a href="http://www.vgrup.com/tag/bash/" title="bash" rel="tag">bash</a>, <a href="http://www.vgrup.com/tag/changelog/" title="changelog" rel="tag">changelog</a>, <a href="http://www.vgrup.com/tag/log-viewer/" title="log viewer" rel="tag">log viewer</a>, <a href="http://www.vgrup.com/tag/script/" title="script" rel="tag">script</a>, <a href="http://www.vgrup.com/tag/zenity/" title="zenity" rel="tag">zenity</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.vgrup.com/2010/02/18/apache-icin-basit-bir-log-viewer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

