<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Tutorial: Using the &#8216;find&#8217; Command</title>
	<atom:link href="http://www.tuxarena.com/2012/03/tutorial-using-the-find-command/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tuxarena.com/2012/03/tutorial-using-the-find-command/</link>
	<description>Ubuntu/Debian/Mint news and tutorials &#124; Linux stuff</description>
	<lastBuildDate>Tue, 16 Apr 2013 18:56:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Craciun Dan</title>
		<link>http://www.tuxarena.com/2012/03/tutorial-using-the-find-command/#comment-34459</link>
		<dc:creator>Craciun Dan</dc:creator>
		<pubDate>Sun, 01 Apr 2012 16:19:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.tuxarena.com/?p=2040#comment-34459</guid>
		<description><![CDATA[Great, that works!]]></description>
		<content:encoded><![CDATA[<p>Great, that works!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://www.tuxarena.com/2012/03/tutorial-using-the-find-command/#comment-34456</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Sun, 01 Apr 2012 13:55:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.tuxarena.com/?p=2040#comment-34456</guid>
		<description><![CDATA[I believe that you can add a &quot;-r&quot; flag to xargs to prevent it from running when there is no input on stdin.]]></description>
		<content:encoded><![CDATA[<p>I believe that you can add a &#8220;-r&#8221; flag to xargs to prevent it from running when there is no input on stdin.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Craciun Dan</title>
		<link>http://www.tuxarena.com/2012/03/tutorial-using-the-find-command/#comment-34450</link>
		<dc:creator>Craciun Dan</dc:creator>
		<pubDate>Sun, 01 Apr 2012 07:17:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.tuxarena.com/?p=2040#comment-34450</guid>
		<description><![CDATA[Thanks for these tips, indeed I overlooked the logical operators.]]></description>
		<content:encoded><![CDATA[<p>Thanks for these tips, indeed I overlooked the logical operators.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Craciun Dan</title>
		<link>http://www.tuxarena.com/2012/03/tutorial-using-the-find-command/#comment-34449</link>
		<dc:creator>Craciun Dan</dc:creator>
		<pubDate>Sun, 01 Apr 2012 07:15:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.tuxarena.com/?p=2040#comment-34449</guid>
		<description><![CDATA[Great to see I could help!]]></description>
		<content:encoded><![CDATA[<p>Great to see I could help!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Dreggors</title>
		<link>http://www.tuxarena.com/2012/03/tutorial-using-the-find-command/#comment-34447</link>
		<dc:creator>David Dreggors</dc:creator>
		<pubDate>Sun, 01 Apr 2012 02:26:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.tuxarena.com/?p=2040#comment-34447</guid>
		<description><![CDATA[A good point on the find command that you overlook in this tip/tutorial page is that when filtering your output, you do not have to pipe to grep.

For instance you said:
&quot;find /usr/share -name FreeSans* &#124; grep Oblique&quot;

that could have been less overhead in memory and easier written/read as follows:

find /usr/share -name FreeSans* -name Oblique

The find command treats 2 &#039;-name&#039; flags as a logical &quot;AND&quot; which for our purpose acts like a filter (grep). To get find to match &quot;either&quot; case we have to separate the &#039;-name&#039; flags by a &#039;-o&#039; (OR) flag 

Example:

$ ls -1
11
111
1122
1212
1221
2131
3131

# Find all files with a 2 in the name
$ find -name &#039;*2*&#039;
./1221
./1212
./2131
./1122

# filter only the names with 22 out of the original list
$ find -name &#039;*2*&#039; -name &#039;*22*&#039;
./1221
./1122

Now I bet I know what you are thinking, that just did the last &#039;-name&#039; flag and did not really use both as a filter.

Then consider this:

# Find any names with a 2 AND a 31 in the name
$ find -name &#039;*2*&#039; -name &#039;*31*&#039;
./2131

# Now find any with a 22 AND a 31 
$ find -name &#039;*22*&#039; -name &#039;*31*&#039;

# oops... none match, but there is a 31 file right?
# There is (2131), but none that have a 22 AND 31.
# This proves the AND works.

# Obviously we would like to prove that AND 
# as well as OR work...
$ find -name &#039;*22*&#039; -o -name &#039;*31*&#039;
./1221
./2131
./1122
./3131

Viola! No need for the overhead of the external call to grep!


Also above you use a &quot;&#124; xargs ls -lh&quot;... try the &quot;-ls&quot; flag to find, it has the same effect without the external call to xargs or ls (twice the overhead).]]></description>
		<content:encoded><![CDATA[<p>A good point on the find command that you overlook in this tip/tutorial page is that when filtering your output, you do not have to pipe to grep.</p>
<p>For instance you said:<br />
&#8220;find /usr/share -name FreeSans* | grep Oblique&#8221;</p>
<p>that could have been less overhead in memory and easier written/read as follows:</p>
<p>find /usr/share -name FreeSans* -name Oblique</p>
<p>The find command treats 2 &#8216;-name&#8217; flags as a logical &#8220;AND&#8221; which for our purpose acts like a filter (grep). To get find to match &#8220;either&#8221; case we have to separate the &#8216;-name&#8217; flags by a &#8216;-o&#8217; (OR) flag </p>
<p>Example:</p>
<p>$ ls -1<br />
11<br />
111<br />
1122<br />
1212<br />
1221<br />
2131<br />
3131</p>
<p># Find all files with a 2 in the name<br />
$ find -name &#8216;*2*&#8217;<br />
./1221<br />
./1212<br />
./2131<br />
./1122</p>
<p># filter only the names with 22 out of the original list<br />
$ find -name &#8216;*2*&#8217; -name &#8216;*22*&#8217;<br />
./1221<br />
./1122</p>
<p>Now I bet I know what you are thinking, that just did the last &#8216;-name&#8217; flag and did not really use both as a filter.</p>
<p>Then consider this:</p>
<p># Find any names with a 2 AND a 31 in the name<br />
$ find -name &#8216;*2*&#8217; -name &#8216;*31*&#8217;<br />
./2131</p>
<p># Now find any with a 22 AND a 31<br />
$ find -name &#8216;*22*&#8217; -name &#8216;*31*&#8217;</p>
<p># oops&#8230; none match, but there is a 31 file right?<br />
# There is (2131), but none that have a 22 AND 31.<br />
# This proves the AND works.</p>
<p># Obviously we would like to prove that AND<br />
# as well as OR work&#8230;<br />
$ find -name &#8216;*22*&#8217; -o -name &#8216;*31*&#8217;<br />
./1221<br />
./2131<br />
./1122<br />
./3131</p>
<p>Viola! No need for the overhead of the external call to grep!</p>
<p>Also above you use a &#8220;| xargs ls -lh&#8221;&#8230; try the &#8220;-ls&#8221; flag to find, it has the same effect without the external call to xargs or ls (twice the overhead).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: someuser</title>
		<link>http://www.tuxarena.com/2012/03/tutorial-using-the-find-command/#comment-34445</link>
		<dc:creator>someuser</dc:creator>
		<pubDate>Sun, 01 Apr 2012 00:56:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.tuxarena.com/?p=2040#comment-34445</guid>
		<description><![CDATA[This has been the most relevant time anyone has posted tutorial for find command. All my laziness on finding cache flv files, using tools went away when I realized youtube did not offer flv on certain files. So I had to use following command inside .mozilla/firefox/whatever.default/Cache directory.

find -size +10000k &#124; xargs vlc

to play all those videos on cache to find out which mattered.  Thanks again. I was wanting to refresh my knowledge on find command once more and this article certainly is a direction ahead.]]></description>
		<content:encoded><![CDATA[<p>This has been the most relevant time anyone has posted tutorial for find command. All my laziness on finding cache flv files, using tools went away when I realized youtube did not offer flv on certain files. So I had to use following command inside .mozilla/firefox/whatever.default/Cache directory.</p>
<p>find -size +10000k | xargs vlc</p>
<p>to play all those videos on cache to find out which mattered.  Thanks again. I was wanting to refresh my knowledge on find command once more and this article certainly is a direction ahead.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
