<?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>Shaun Abram &#187; unix</title>
	<atom:link href="http://www.shaunabram.com/tag/unix/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.shaunabram.com</link>
	<description>Java and Technology weblog</description>
	<lastBuildDate>Tue, 27 Jul 2010 23:14:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Find files in Unix</title>
		<link>http://www.shaunabram.com/find-files-in-unix/</link>
		<comments>http://www.shaunabram.com/find-files-in-unix/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 23:06:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.shaunabram.com/?p=475</guid>
		<description><![CDATA[I frequently end up searching an entire directory for an elusive file and I can never remember the exact command structure, so posting here: find /dir/to/search -name "filename.ext" -print 2&#62;/dev/null And wildcards are allowed. e.g. find /dir/to/search -name "filename.*" -print 2&#62;/dev/null The command searches /dir/to/search AND all sub directories. The &#8217;2>/dev/null&#8217; avoids those annoying &#8220;find: [...]]]></description>
			<content:encoded><![CDATA[<p>I frequently end up searching an entire directory for an elusive file and I can never remember the exact command structure, so posting here:</p>
<pre><code>    find /dir/to/search -name "filename.ext" -print 2&gt;/dev/null</code></pre>
<p>And wildcards are allowed. e.g. </p>
<pre><code>    find /dir/to/search -name "filename.*" -print 2&gt;/dev/null</code></pre>
<p>The command searches /dir/to/search AND all sub directories.</p>
<p>The &#8217;2>/dev/null&#8217; avoids those annoying &#8220;find: cannot read dir &#8230;: Permission denied&#8221; errors.</p>
<pre><code>
</code></pre>
<p>Also, if you want to search for files containing specific text, try</p>
<pre><code>    find /dir/to/search -exec grep -il "txtToSearchFor" {} \;</code></pre>
<p>The &#8220;-il&#8221; means ignore case and print only the names of files  with matching lines (as opposed to the line contents).</p>
<pre><code> </code></pre>
<p>See also:<br />
<a href="http://en.wikipedia.org/wiki/Find">http://en.wikipedia.org/wiki/Find</a><br />
<a href="http://www.unix.com/unix-dummies-questions-answers/3152-find-files-containing-text.html">http://www.unix.com/unix-dummies-questions-answers/3152-find-files-containing-text.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.shaunabram.com/find-files-in-unix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
