<?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>info.michael-simons.eu &#187; Shortcuts</title>
	<atom:link href="http://info.michael-simons.eu/category/shortcuts/feed/" rel="self" type="application/rss+xml" />
	<link>http://info.michael-simons.eu</link>
	<description>Just another nerd blog</description>
	<lastBuildDate>Wed, 08 Feb 2012 10:26:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Git snippets</title>
		<link>http://info.michael-simons.eu/2011/12/22/git-snippets/</link>
		<comments>http://info.michael-simons.eu/2011/12/22/git-snippets/#comments</comments>
		<pubDate>Thu, 22 Dec 2011 20:11:36 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[English posts]]></category>
		<category><![CDATA[Shortcuts]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Tipps]]></category>

		<guid isPermaLink="false">http://info.michael-simons.eu/?p=614</guid>
		<description><![CDATA[These are a view things that i had looked up to solve some problems and i plan to update this post regularly… To push a new branch to remote git push origin new_branch To delete a remote branch git push origin :new_branch To push new tags git push --tags origin To delete a remote tag [...]]]></description>
			<content:encoded><![CDATA[<p><em>These are a view things that i had looked up to solve some problems and i plan to update this post regularly…</em></p>
<p>To push a new branch to remote</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">git</span> push origin new_branch</pre></div></div>

<p>To delete a remote branch</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">git</span> push origin :new_branch</pre></div></div>

<p>To push new tags</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">git</span> push <span style="color: #660033;">--tags</span> origin</pre></div></div>

<p>To delete a remote tag</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">git</span> tag <span style="color: #660033;">-d</span> <span style="color: #000000;">12345</span>
<span style="color: #c20cb9; font-weight: bold;">git</span> push origin :refs<span style="color: #000000; font-weight: bold;">/</span>tags<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">12345</span></pre></div></div>

<p>To reset a local branch to exactly match a remote branch</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">git</span> fetch origin
<span style="color: #c20cb9; font-weight: bold;">git</span> reset <span style="color: #660033;">--hard</span> origin<span style="color: #000000; font-weight: bold;">/</span>master</pre></div></div>

<p>To abort a rebase</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">git</span> rebase <span style="color: #660033;">--abort</span></pre></div></div>

<p>Changing the origin of your git repository (relocate the repository)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">git</span> config remote.origin.url <span style="color: #7a0874; font-weight: bold;">&#91;</span>new origin url<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p><em>Last update: 2012/01/04</em></p>
<p class="akst_link"><a href="http://info.michael-simons.eu/?p=614&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_614" class="akst_share_link " rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://info.michael-simons.eu/2011/12/22/git-snippets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scripted network mounts with Windows</title>
		<link>http://info.michael-simons.eu/2011/12/12/scripted-network-mounts-with-windows/</link>
		<comments>http://info.michael-simons.eu/2011/12/12/scripted-network-mounts-with-windows/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 09:05:23 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[English posts]]></category>
		<category><![CDATA[Shortcuts]]></category>
		<category><![CDATA[Mount]]></category>
		<category><![CDATA[Network Share]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://info.michael-simons.eu/?p=569</guid>
		<description><![CDATA[I have some services and scheduled tasks that call a Batch file under windows. The scheduled tasks cannot access network drives that the assigned user has defined, but luckily there is a &#8220;mount&#8221; pendant within Windows as well. To mount a network share within the Batch script use: net use t: \\server\share /persistent:no The authentication [...]]]></description>
			<content:encoded><![CDATA[<p>I have some services and scheduled tasks that call a Batch file under windows. The scheduled tasks cannot access network drives that the assigned user has defined, but luckily there is a &#8220;mount&#8221; pendant within Windows as well.</p>
<p>To mount a network share within the Batch script use:</p>
<pre>
net use t: \\server\share /persistent:no
</pre>
<p>The authentication is taken from the user that is assigned to the task.</p>
<p>If this not enough use</p>
<pre>
net use t: \\server\share /persistent:no /user:user@domain password
</pre>
<p>To unmount the share use</p>
<pre>
net use t: /delete
</pre>
<p class="akst_link"><a href="http://info.michael-simons.eu/?p=569&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_569" class="akst_share_link " rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://info.michael-simons.eu/2011/12/12/scripted-network-mounts-with-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create reusable MySQL schema dumps</title>
		<link>http://info.michael-simons.eu/2010/09/16/create-reusable-mysql-schema-dumps/</link>
		<comments>http://info.michael-simons.eu/2010/09/16/create-reusable-mysql-schema-dumps/#comments</comments>
		<pubDate>Thu, 16 Sep 2010 09:18:39 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[English posts]]></category>
		<category><![CDATA[Shortcuts]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Tipps]]></category>

		<guid isPermaLink="false">http://info.michael-simons.eu/?p=449</guid>
		<description><![CDATA[In case you need a MySQL schema transferred from one host to another and the schema names differ, you can ran into problems with a standard MySQL dump. Use the following statement to create a schema dump that contains all table and view definitions as well as all stored procedures without a reference to the [...]]]></description>
			<content:encoded><![CDATA[<p>In case you need a MySQL schema transferred from one host to another and the schema names differ, you can ran into problems with a standard MySQL dump.</p>
<p>Use the following statement to create a schema dump that contains all table and view definitions as well as all stored procedures without a reference to the original schema:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> mysqldump <span style="color: #660033;">-uroot</span> <span style="color: #660033;">-p</span> name_of_the_original_schema <span style="color: #660033;">--no-data</span> <span style="color: #660033;">--opt</span> <span style="color: #660033;">--routines</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/`name_of_the_original_schema`.//g'</span> <span style="color: #000000; font-weight: bold;">&gt;</span> dump.sql</pre></div></div>

<p>The dump will only contain the schema definition and no data. Calls to routines will not be prefixed with a schema name.</p>
<p class="akst_link"><a href="http://info.michael-simons.eu/?p=449&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_449" class="akst_share_link " rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://info.michael-simons.eu/2010/09/16/create-reusable-mysql-schema-dumps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find all non &#8220;.java&#8221; files but not in .svn directories</title>
		<link>http://info.michael-simons.eu/2010/08/19/find-all-non-java-files-but-not-in-svn-directories/</link>
		<comments>http://info.michael-simons.eu/2010/08/19/find-all-non-java-files-but-not-in-svn-directories/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 14:13:12 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Shortcuts]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://info.michael-simons.eu/?p=422</guid>
		<description><![CDATA[I&#8217;m migrating some old projects to Maven and i need to move all resources out of the source tree. find . -type d -name '\.svn' -prune -o -type f -not -iname &#34;*.java&#34; -print Prune every directory named &#8216;.svn&#8217; Or Type is file and the name ends not with &#8220;*.java&#8221; I tried to create the necessary [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m migrating some old projects to Maven and i need to move all resources out of the source tree.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-type</span> d <span style="color: #660033;">-name</span> <span style="color: #ff0000;">'\.svn'</span> <span style="color: #660033;">-prune</span> <span style="color: #660033;">-o</span> <span style="color: #660033;">-type</span> f <span style="color: #660033;">-not</span> <span style="color: #660033;">-iname</span> <span style="color: #ff0000;">&quot;*.java&quot;</span> <span style="color: #660033;">-print</span></pre></div></div>

<ul>
<li>Prune every directory named &#8216;.svn&#8217;</li>
<li>Or</li>
<li>Type is file and the name ends not with &#8220;*.java&#8221;</li>
</ul>
<p>I tried to create the necessary directories within the same command but after about half an hour xargs trial and error, i&#8217;ll do it manually, the list of files is small enough <img src='http://info.michael-simons.eu/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p class="akst_link"><a href="http://info.michael-simons.eu/?p=422&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_422" class="akst_share_link " rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://info.michael-simons.eu/2010/08/19/find-all-non-java-files-but-not-in-svn-directories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle NLS-Lang Settings</title>
		<link>http://info.michael-simons.eu/2010/08/13/oracle-nls-lang-settings/</link>
		<comments>http://info.michael-simons.eu/2010/08/13/oracle-nls-lang-settings/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 14:23:38 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[English posts]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Shortcuts]]></category>
		<category><![CDATA[NLS_LANG]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://info.michael-simons.eu/?p=419</guid>
		<description><![CDATA[To use SQL*Plus Windows correctly, export NLS_LANG like so: set NLS_LANG=GERMAN_GERMANY.WE8MSWIN1252 If you prefer the command line client SQL*Plus, export NLS_LANG like so: set NLS_LANG=GERMAN_GERMANY.WE8PC850 Share This]]></description>
			<content:encoded><![CDATA[<p>To use SQL*Plus Windows correctly, export NLS_LANG like so:</p>
<pre>set NLS_LANG=GERMAN_GERMANY.WE8MSWIN1252</pre>
<p>If you prefer the command line client SQL*Plus, export NLS_LANG like so:</p>
<pre>set NLS_LANG=GERMAN_GERMANY.WE8PC850</pre>
<p class="akst_link"><a href="http://info.michael-simons.eu/?p=419&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_419" class="akst_share_link " rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://info.michael-simons.eu/2010/08/13/oracle-nls-lang-settings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using SQL*Plus without tnsnames.ora</title>
		<link>http://info.michael-simons.eu/2010/03/29/using-sqlplus-without-tnsnames-ora/</link>
		<comments>http://info.michael-simons.eu/2010/03/29/using-sqlplus-without-tnsnames-ora/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 07:40:32 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[English posts]]></category>
		<category><![CDATA[Shortcuts]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://info.michael-simons.eu/?p=402</guid>
		<description><![CDATA[As often, a quick reminder for me. I&#8217;m using the Oracle Instaclient on my Mac without a tnsnames.ora and i keep forgetting the connectstring syntax: sqlplus USER/PASS@//HOST:PORT/SID Extra bonus points: Through in rlwrap to get a nice commandline history and completion as used to in a standard shell: rlwrap sqlplus USER/PASS@//HOST:PORT/SID Share This]]></description>
			<content:encoded><![CDATA[<p>As often, a quick reminder for me. I&#8217;m using the Oracle Instaclient on my Mac without a tnsnames.ora and i keep forgetting the connectstring syntax:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">sqlplus USER<span style="color: #000000; font-weight: bold;">/</span>PASS<span style="color: #000000; font-weight: bold;">@//</span>HOST:PORT<span style="color: #000000; font-weight: bold;">/</span>SID</pre></div></div>

<p>Extra bonus points: Through in <a href="http://freshmeat.net/projects/rlwrap/">rlwrap</a> to get a nice commandline history and completion as used to in a standard shell:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rlwrap sqlplus USER<span style="color: #000000; font-weight: bold;">/</span>PASS<span style="color: #000000; font-weight: bold;">@//</span>HOST:PORT<span style="color: #000000; font-weight: bold;">/</span>SID</pre></div></div>

<p class="akst_link"><a href="http://info.michael-simons.eu/?p=402&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_402" class="akst_share_link " rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://info.michael-simons.eu/2010/03/29/using-sqlplus-without-tnsnames-ora/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVN: Revert to previous version</title>
		<link>http://info.michael-simons.eu/2009/09/09/svn-revert-to-previous-version/</link>
		<comments>http://info.michael-simons.eu/2009/09/09/svn-revert-to-previous-version/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 20:56:29 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[English posts]]></category>
		<category><![CDATA[Shortcuts]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[Tipps]]></category>

		<guid isPermaLink="false">http://info.michael-simons.eu/?p=366</guid>
		<description><![CDATA[Just a quick reminder: To revert a complete working copy or a single file use: svn merge -rHEAD:PREV . # or svn merge -rHEAD:PREV path/to/file svn commit -m &#34;reverted&#34; Share This]]></description>
			<content:encoded><![CDATA[<p>Just a quick reminder:</p>
<p>To revert a complete working copy or a single file use:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svn</span> merge -rHEAD:PREV .
<span style="color: #666666; font-style: italic;"># or</span>
<span style="color: #c20cb9; font-weight: bold;">svn</span> merge -rHEAD:PREV path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">file</span>
<span style="color: #c20cb9; font-weight: bold;">svn</span> commit <span style="color: #660033;">-m</span> <span style="color: #ff0000;">&quot;reverted&quot;</span></pre></div></div>

<p class="akst_link"><a href="http://info.michael-simons.eu/?p=366&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_366" class="akst_share_link " rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://info.michael-simons.eu/2009/09/09/svn-revert-to-previous-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Batchconvert ascii to utf8</title>
		<link>http://info.michael-simons.eu/2009/05/12/batchconvert-ascii-to-utf8/</link>
		<comments>http://info.michael-simons.eu/2009/05/12/batchconvert-ascii-to-utf8/#comments</comments>
		<pubDate>Tue, 12 May 2009 08:41:17 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[English posts]]></category>
		<category><![CDATA[Shortcuts]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://info.michael-simons.eu/?p=333</guid>
		<description><![CDATA[Next time i see umlauts in source, I&#8217;ll scream. Loud. In the mean time I try this: find . -iname &#34;*.java&#34; -exec sh -c 'iconv -f cp1252 -t utf-8 {} &#62; {}.utf8' \; for i in `&#40;find . -name &#34;*.utf8&#34;&#41;`; do mv $i ${i/.utf8/}; done Before you try this, make a backup of your files. [...]]]></description>
			<content:encoded><![CDATA[<p>Next time i see umlauts in source, I&#8217;ll scream. Loud.</p>
<p>In the mean time I try this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-iname</span> <span style="color: #ff0000;">&quot;*.java&quot;</span> <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">sh</span> <span style="color: #660033;">-c</span> <span style="color: #ff0000;">'iconv -f cp1252 -t utf-8 {} &gt; {}.utf8'</span> \;
<span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;*.utf8&quot;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #000000; font-weight: bold;">`</span>; <span style="color: #000000; font-weight: bold;">do</span> <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #007800;">$i</span> <span style="color: #800000;">${i/.utf8/}</span>; <span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

<p>Before you try this, make a backup of your files. It worked for me but i don&#8217;t guaranty that your files won&#8217;t vanish. </p>
<p class="akst_link"><a href="http://info.michael-simons.eu/?p=333&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_333" class="akst_share_link " rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://info.michael-simons.eu/2009/05/12/batchconvert-ascii-to-utf8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XML / XSD Schema validation on Mac OS X</title>
		<link>http://info.michael-simons.eu/2009/01/16/xml-xsd-schema-validation-on-mac-os-x/</link>
		<comments>http://info.michael-simons.eu/2009/01/16/xml-xsd-schema-validation-on-mac-os-x/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 16:49:06 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[English posts]]></category>
		<category><![CDATA[Shortcuts]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XSD]]></category>

		<guid isPermaLink="false">http://info.michael-simons.eu/?p=252</guid>
		<description><![CDATA[I found no fancy graphical xml validator on OS X, but this isn&#8217;t a problem. OS X includes libxml which comes with xmllint. To validate a xml file against a schema: xmllint --noout --schema sitemap.xsd sitemap.xml Share This]]></description>
			<content:encoded><![CDATA[<p>I found no fancy graphical xml validator on OS X, but this isn&#8217;t a problem.</p>
<p>OS X includes libxml which comes with <em>xmllint</em>.</p>
<p>To validate a xml file against a schema:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">xmllint <span style="color: #660033;">--noout</span> <span style="color: #660033;">--schema</span> sitemap.xsd sitemap.xml</pre></div></div>

<p class="akst_link"><a href="http://info.michael-simons.eu/?p=252&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_252" class="akst_share_link " rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://info.michael-simons.eu/2009/01/16/xml-xsd-schema-validation-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recursively md5sum all files in a directory tree</title>
		<link>http://info.michael-simons.eu/2008/10/25/recursively-md5sum-all-files-in-a-directory-tree/</link>
		<comments>http://info.michael-simons.eu/2008/10/25/recursively-md5sum-all-files-in-a-directory-tree/#comments</comments>
		<pubDate>Sat, 25 Oct 2008 09:31:21 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[English posts]]></category>
		<category><![CDATA[Shortcuts]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://info.michael-simons.eu/?p=219</guid>
		<description><![CDATA[After a server crash a wanted to compare all actual files with the backuped data. An easy way is to compare the md5 hashes like that: First create recursively md5 hashes from all files in that directory: find ./backup -type f -print0 &#124; xargs -0 md5sum &#62; /checksums_backup.md5 Then check the actual data: md5sum -c [...]]]></description>
			<content:encoded><![CDATA[<p>After a server crash a wanted to compare all actual files with the backuped data. An easy way is to compare the md5 hashes like that:</p>
<p>First create recursively md5 hashes from all files in that directory:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">find</span> .<span style="color: #000000; font-weight: bold;">/</span>backup <span style="color: #660033;">-type</span> f <span style="color: #660033;">-print0</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">xargs</span> <span style="color: #660033;">-0</span> md5sum <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>checksums_backup.md5</pre></div></div>

<p>Then check the actual data:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">md5sum <span style="color: #660033;">-c</span> checksums_backup.md5</pre></div></div>

<p>I was lucky, no files where damaged.</p>
<p class="akst_link"><a href="http://info.michael-simons.eu/?p=219&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_219" class="akst_share_link " rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://info.michael-simons.eu/2008/10/25/recursively-md5sum-all-files-in-a-directory-tree/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.653 seconds -->

