<?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>madapez&#187; madapez.com befasst sich mit Linux mint, Kurzgeschichten, Freizeit und alles Kreativ-e</title>
	<atom:link href="http://madapez.com/tag/linux-befehl-der-woche/feed/" rel="self" type="application/rss+xml" />
	<link>http://madapez.com</link>
	<description>IT, Linux, Web und Kreatives aus der Sicht eines verrückten Affen</description>
	<lastBuildDate>Tue, 27 Jul 2010 09:54:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Linux Befehl der Woche: find</title>
		<link>http://madapez.com/it/linux/linux-befehl-der-woche-find/</link>
		<comments>http://madapez.com/it/linux/linux-befehl-der-woche-find/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 00:03:03 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Befehl der Woche]]></category>

		<guid isPermaLink="false">http://madapez.com/?p=388</guid>
		<description><![CDATA[Nur der Kleingeist hält Ordnung, das Genie überblickt das Chaos! Mein Freund Euphemismus würde sagen: Ich suche nicht, ich finde! Man soll auch nicht meinen, nur weil man mal etwas finden muss, dass man keine Ordnung hält. Was ich sagen möchte ist, jeder Mensch muss mal suchen und das klappt im Linux am schönsten mit [...]]]></description>
			<content:encoded><![CDATA[<p>Nur der Kleingeist hält Ordnung, das Genie überblickt das Chaos! Mein Freund <a title="Euphemismus" href="http://de.wikipedia.org/wiki/Euphemismus">Euphemismus</a> würde sagen: Ich suche nicht, ich finde! Man soll auch nicht meinen, nur weil man mal etwas finden muss, dass man keine Ordnung hält. Was ich sagen möchte ist, jeder Mensch muss mal suchen und das klappt im Linux am schönsten mit dem Befehl find. Da ich diese Woche für den Barry-Artikel etwas finden musste, weil ich nicht wusste wo es gespeichert wird, war der find-befehl der Shell mein Freund. Dies nehme ich als Anlass den Befehl find mal vorzustellen.<span id="more-388"></span></p>
<h2>1. Anwendungsfälle</h2>
<p>Stell dir vor du suchst die Datei &#8220;datei1.txt&#8221; im aktuellen Ordner.  Dann hilft dir find:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">daniel<span style="color: #000000; font-weight: bold;">@</span>jack ~<span style="color: #000000; font-weight: bold;">/</span>Dokumente $ <span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-name</span> datei1.txt
.<span style="color: #000000; font-weight: bold;">/</span>testordner<span style="color: #000000; font-weight: bold;">/</span>datei1.txt</pre></div></div>

<p>Suche nach &#8220;datei1.txt&#8221; im gesamten Home-Verzeichnis:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">daniel<span style="color: #000000; font-weight: bold;">@</span>jack ~<span style="color: #000000; font-weight: bold;">/</span>Dokumente $ <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span>home <span style="color: #660033;">-name</span> datei1.txt
<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>daniel<span style="color: #000000; font-weight: bold;">/</span>Dokumente<span style="color: #000000; font-weight: bold;">/</span>testordner<span style="color: #000000; font-weight: bold;">/</span>datei1.txt</pre></div></div>

<p>Suche nach txt-Dateien im testordner:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">daniel<span style="color: #000000; font-weight: bold;">@</span>jack ~<span style="color: #000000; font-weight: bold;">/</span>Dokumente $ <span style="color: #c20cb9; font-weight: bold;">find</span> testordner<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;*.txt&quot;</span>
testordner<span style="color: #000000; font-weight: bold;">/</span>datei1.txt
testordner<span style="color: #000000; font-weight: bold;">/</span>datei2.txt</pre></div></div>

<p>Suche nach Dateien die kleiner als 1 k sind:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">daniel<span style="color: #000000; font-weight: bold;">@</span>jack ~<span style="color: #000000; font-weight: bold;">/</span>Dokumente $ <span style="color: #c20cb9; font-weight: bold;">find</span> testordner<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-size</span> <span style="color: #660033;">-1k</span>
testordner<span style="color: #000000; font-weight: bold;">/</span>datei1.txt
testordner<span style="color: #000000; font-weight: bold;">/</span>cow.jpg</pre></div></div>

<p>Suche nach Dateien die größer als 1 k sind (zeigt auch Ordner mit an):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">daniel<span style="color: #000000; font-weight: bold;">@</span>jack ~<span style="color: #000000; font-weight: bold;">/</span>Dokumente $ <span style="color: #c20cb9; font-weight: bold;">find</span> testordner<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-size</span> +1k
testordner<span style="color: #000000; font-weight: bold;">/</span>
testordner<span style="color: #000000; font-weight: bold;">/</span>datei2.txt</pre></div></div>

<p>Suche nach Dateien des Types &#8220;file&#8221; die größer als 1 k sind (zeigt nur Dateien an):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">daniel<span style="color: #000000; font-weight: bold;">@</span>jack ~<span style="color: #000000; font-weight: bold;">/</span>Dokumente $ <span style="color: #c20cb9; font-weight: bold;">find</span> testordner<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-size</span> +1k <span style="color: #660033;">-type</span> f
testordner<span style="color: #000000; font-weight: bold;">/</span>datei2.txt</pre></div></div>

<p>Suche nach Dateien die vor maximal 5,10,15,20 Minuten erstellt wurden :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">daniel<span style="color: #000000; font-weight: bold;">@</span>jack ~<span style="color: #000000; font-weight: bold;">/</span>Dokumente $ <span style="color: #c20cb9; font-weight: bold;">find</span> testordner<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-type</span> f <span style="color: #660033;">-mmin</span> <span style="color: #660033;">-5</span>
daniel<span style="color: #000000; font-weight: bold;">@</span>jack ~<span style="color: #000000; font-weight: bold;">/</span>Dokumente $ <span style="color: #c20cb9; font-weight: bold;">find</span> testordner<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-type</span> f <span style="color: #660033;">-mmin</span> <span style="color: #660033;">-10</span>
testordner<span style="color: #000000; font-weight: bold;">/</span>cow.jpg
daniel<span style="color: #000000; font-weight: bold;">@</span>jack ~<span style="color: #000000; font-weight: bold;">/</span>Dokumente $ <span style="color: #c20cb9; font-weight: bold;">find</span> testordner<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-type</span> f <span style="color: #660033;">-mmin</span> <span style="color: #660033;">-15</span>
testordner<span style="color: #000000; font-weight: bold;">/</span>datei2.txt
testordner<span style="color: #000000; font-weight: bold;">/</span>cow.jpg
daniel<span style="color: #000000; font-weight: bold;">@</span>jack ~<span style="color: #000000; font-weight: bold;">/</span>Dokumente $ <span style="color: #c20cb9; font-weight: bold;">find</span> testordner<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-type</span> f <span style="color: #660033;">-mmin</span> <span style="color: #660033;">-20</span>
testordner<span style="color: #000000; font-weight: bold;">/</span>datei1.txt
testordner<span style="color: #000000; font-weight: bold;">/</span>datei2.txt
testordner<span style="color: #000000; font-weight: bold;">/</span>cow.jpg</pre></div></div>

<p>Was du noch alles mit find anstellen kannst erfährst du auf diesem Weg:</p>

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

<p>Fragen, Anregungen und Kritik bitte in die Comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://madapez.com/it/linux/linux-befehl-der-woche-find/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
