<?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>gHacks technology news &#187; find</title>
	<atom:link href="http://www.ghacks.net/tag/find/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ghacks.net</link>
	<description>A technology blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description>
	<lastBuildDate>Tue, 24 Nov 2009 11:26:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Let Catfish search for your files</title>
		<link>http://www.ghacks.net/2009/06/01/let-catfish-search-for-your-files/</link>
		<comments>http://www.ghacks.net/2009/06/01/let-catfish-search-for-your-files/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 18:44:33 +0000</pubDate>
		<dc:creator>Jack Wallen</dc:creator>
				<category><![CDATA[Advice]]></category>
		<category><![CDATA[Desktop Manager]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Search Engines]]></category>
		<category><![CDATA[Tutorials Basic]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[Beagle]]></category>
		<category><![CDATA[file searching]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[locate]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=13222</guid>
		<description><![CDATA[If you need to do any searching for files on a Linux system you know your choices for reliable searching are Beagle, locate, and find. Outside of that the results will vary. The only problem with Beagle is that it can be resource intensive, because it is an indexing search. Find and locate are good [...]]]></description>
			<content:encoded><![CDATA[<p>If you need to do any searching for files on a Linux system you know your choices for reliable searching are <a title="Beagle" href="http://beagle-project.org/Main_Page" target="_blank">Beagle</a>, locate, and find. Outside of that the results will vary. The only problem with Beagle is that it can be resource intensive, because it is an indexing search. Find and locate are good but are command line tools. But what if you want to have your cake and eat it too? What if you want to have your choice of search tools and you want that choice to be within a simple graphical interface? That is where <a title="Catfish" href="http://software.twotoasts.de/index.php?/pages/catfish_summary.html" target="_blank">Catfish</a> comes in.</p>
<p>Catfish is a simple graphical interface that works with any search tool you have installed. And if you have multiple search tools installed, you can have your choice of which tool to use for the search. Let&#8217;s take a look at this very handy search tool.</p>
<p><span id="more-13222"></span><strong>Getting and installing</strong></p>
<p>The easiest means of installing Catfish is to open up the Add/Remove Software utility, do a search for &#8220;catfish&#8221; (no quotes), select the results, and click Apply. If you&#8217;d rather install via command line you can do so with a command like:</p>
<p><em>sudo apt-get install catfish </em></p>
<p>or</p>
<p><em>yum install catfish</em></p>
<p>The installation command you use will depend upon the distribution you use.</p>
<p>To start Catfish you will find an entry for it in your desktop menu. For example, in Enlightenment E17 that entry is in Accessories. You can also open the Run command (again depending upon your distribution) issue the command <em>catfish</em> (this can also be done from the command line.)</p>
<div id="attachment_13223" class="wp-caption alignleft" style="width: 310px"><a href="http://www.ghacks.net/wp-content/uploads/2009/06/catfish_main.png"><img class="size-medium wp-image-13223" src="http://www.ghacks.net/wp-content/uploads/2009/06/catfish_main-500x357.png" alt="Figure 1" width="300" height="214" /></a><p class="wp-caption-text">Figure 1</p></div>
<p>When Catfish opens you will see what should be a very user-friendly interface broken into two panes (see Figure 1). The left pane is where you enter all of your search options and the right pane is where your search results will appear.</p>
<p>You may also  notice there are no options for Catfish itself. This makes Catfish focus only on the searching so it is as efficient as possible.</p>
<p>To enter a search you need to take into consideration what type of search you want to do. On my particular system I have Beagle, find, and locate installed. So I can choose from any of those three to handle my results. The reason I say to consider which type of search you are doing first is because the type of search will determine the types of options you have available. For instance, if I use find the Fulltext Search option is not available. If I use Beagle I can not use wildcards in my searching.</p>
<p>Because of this, I like to select my search type first. Once I have selected the type I go back and enter the search string and define any options I may want.</p>
<div id="attachment_13224" class="wp-caption alignright" style="width: 310px"><a href="http://www.ghacks.net/wp-content/uploads/2009/06/catfish_search.png"><img class="size-medium wp-image-13224" src="http://www.ghacks.net/wp-content/uploads/2009/06/catfish_search-500x357.png" alt="Figure 2" width="300" height="214" /></a><p class="wp-caption-text">Figure 2</p></div>
<p>Let&#8217;s do a Beagle search for the string &#8220;ghacks&#8221; (no quotes). I will select to add Hidden files as well as Fulltext search.</p>
<p>Once I have everything configured I hit Find and the results will appear in the right pane (see Figure 2). You can click on the results to open a suitable application. For instance, if I click on the <em>ghacks.png</em> result, on my Enligtenment desktop, the file will open in GQview. If I click on one of the folders I get an error because there is no application associated with them. I can, however, right click the folder and choose to copy the folder or save to a file. If I double click on the archive file File Roller will open with the archive.</p>
<p><strong>Final thoughts</strong></p>
<p>If you do much searching on your drive, and you use different tools for different types of searches, you should certainly employ Catfish to make your searching easier.</p>

	Tags: <a href="http://www.ghacks.net/tag/beagle/" title="Beagle" rel="tag">Beagle</a>, <a href="http://www.ghacks.net/tag/file-searching/" title="file searching" rel="tag">file searching</a>, <a href="http://www.ghacks.net/tag/find/" title="find" rel="tag">find</a>, <a href="http://www.ghacks.net/tag/linux/" title="Linux" rel="tag">Linux</a>, <a href="http://www.ghacks.net/tag/locate/" title="locate" rel="tag">locate</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/05/29/troubleshooting-a-maxed-out-linux-hard-drive/" title="Troubleshooting a maxed out Linux hard drive (May 29, 2009)">Troubleshooting a maxed out Linux hard drive</a> (7)</li>
	<li><a href="http://www.ghacks.net/2009/02/13/searching-for-files-in-linux-via-command-line/" title="Searching for Files in Linux via Command Line (February 13, 2009)">Searching for Files in Linux via Command Line</a> (3)</li>
	<li><a href="http://www.ghacks.net/2009/01/14/enable-beagle-searching-in-gnome/" title="Enable Beagle Searching in GNOME (January 14, 2009)">Enable Beagle Searching in GNOME</a> (5)</li>
	<li><a href="http://www.ghacks.net/2008/02/07/yoggie-pico-personal-mobile-security-computer/" title="Yoggie PICO Personal Mobile Security Computer (February 7, 2008)">Yoggie PICO Personal Mobile Security Computer</a> (3)</li>
	<li><a href="http://www.ghacks.net/2009/10/30/with-ubuntu-9-10-arrives-wubi-9-10/" title="With Ubuntu 9.10 Arrives Wubi 9.10 (October 30, 2009)">With Ubuntu 9.10 Arrives Wubi 9.10</a> (2)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/06/01/let-catfish-search-for-your-files/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Troubleshooting a maxed out Linux hard drive</title>
		<link>http://www.ghacks.net/2009/05/29/troubleshooting-a-maxed-out-linux-hard-drive/</link>
		<comments>http://www.ghacks.net/2009/05/29/troubleshooting-a-maxed-out-linux-hard-drive/#comments</comments>
		<pubDate>Fri, 29 May 2009 18:18:48 +0000</pubDate>
		<dc:creator>Jack Wallen</dc:creator>
				<category><![CDATA[Advice]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials Basic]]></category>
		<category><![CDATA[file searching]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[system administration]]></category>
		<category><![CDATA[xargs]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=13156</guid>
		<description><![CDATA[Yesterday I sat down at my main desktop PC to do some work and, out of nowhere, error message after error message popped up informing me the hard drive was at 100% capacity which meant the operating system had no room to write to. This baffled me as I was 100% sure there should have [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I sat down at my main desktop PC to do some work and, out of nowhere, error message after error message popped up informing me the hard drive was at 100% capacity which meant the operating system had no room to write to. This baffled me as I was 100% sure there should have been over 60 gigs of space available. My first inclination was to search for larger files that might have grown out of hand &#8211; torrents especially.</p>
<p>After much searching I saw nothing. I even started at the / directory and was coming up with nothing. So naturally I went right to the log files. Believe it or not, it was not in the log files that I discovered where the problem was. Of course I thought I should share this experience with ghacks in order to illustrate how troubleshooting a Linux machine can go.</p>
<p><span id="more-13156"></span>After the futile manual file search for files I went to the logs. The first log I went to (which is the first log I always turn to) <em>dmesg </em>which prints the message buffer from the kernel. To view this you just type <em>dmesg</em> at the terminal window. This was my first strike as the kernel buffer knew nothing of my capacity drive.</p>
<p>My next step was to head on over to <strong>/var/log</strong> and take a peek around any of the log files that might offer up a clue as to why my hard drive was maxed out. My instincts always take me to <strong>/var/log/messages</strong> first. This particular log file keeps track of general system information regarding boot up, networking. Another strike.</p>
<p>At this point I realized I had to take a break and clear some space because the warnings wouldn&#8217;t stop. I doubled checked to make sure the reports were correct by issuing the command:</p>
<p><em>df -h</em></p>
<p>which confirmed that /dev/sda1 was at 100% usage. I managed to free up a couple of gigs of space by deleting some torrents. The errors went away and I could continue working.</p>
<p>My next step was to check the size of my proxy logs and Dansguardian logs. I had to move both systems over to my main desktop and had a feeling those logs needed to be rotated. I was right, but it didn&#8217;t solve my problem. The tiny prox logs weren&#8217;t huge (by any stretch of the imagination), but they were many. So I deleted the older logs and moved on.</p>
<p>I was running out of log files to check and nothing had given me any idea what was going on.</p>
<p><strong>Search and destroy</strong></p>
<p>It was time to go back to the search method. But instead of using the manual method (how long would it take to weed through the ENTIRE Linux file system &#8211; I didn&#8217;t want to know) I opted to employ a little help thanks to the <em>find</em> command. The <em>find</em> command allows you to add switches to your search to indicate file size. In my case I wanted to first see if there were any files larger than 100 MB in size. To do this I will issue the command:</p>
<p><em>find / -size +1000000k -print0 | xargs -0 ls -l</em></p>
<p>as either root or using <em>sudo</em>. What this command does is tell <em>find</em> to search for files &gt; 1000MB and send them to the standard output (that&#8217;s basically the terminal window), and pipe them to xargs so that you can see the detailed list (using &#8220;-l&#8221; of <em>ls</em>).  Because I was starting at the root directory, I knew this would take some time.</p>
<p>It did. But after some time I discovered five files that were each 12 gigs in size in <em>/var/cache/. </em>These files were from a backup program I was working with and forgot to disable. So once a week my entire <strong>/home </strong>directory was being backed up. I deleted the files (recovering sixty gigs of space) and disabled the backup program. Problem solved.</p>
<p><strong>Final thoughts</strong></p>
<p>There are times when even the best logging system available will not tell you what you need to know. At those times you have to employ your best sluething techniques. Fortunately the Linux operating system encourages these types of administration tricks.</p>

	Tags: <a href="http://www.ghacks.net/tag/file-searching/" title="file searching" rel="tag">file searching</a>, <a href="http://www.ghacks.net/tag/find/" title="find" rel="tag">find</a>, <a href="http://www.ghacks.net/tag/linux/" title="Linux" rel="tag">Linux</a>, <a href="http://www.ghacks.net/tag/system-administration/" title="system administration" rel="tag">system administration</a>, <a href="http://www.ghacks.net/tag/xargs/" title="xargs" rel="tag">xargs</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/06/01/let-catfish-search-for-your-files/" title="Let Catfish search for your files (June 1, 2009)">Let Catfish search for your files</a> (6)</li>
	<li><a href="http://www.ghacks.net/2009/03/24/webmin-one-stop-linux-configuration/" title="Webmin: One Stop Linux Configuration (March 24, 2009)">Webmin: One Stop Linux Configuration</a> (1)</li>
	<li><a href="http://www.ghacks.net/2009/02/13/searching-for-files-in-linux-via-command-line/" title="Searching for Files in Linux via Command Line (February 13, 2009)">Searching for Files in Linux via Command Line</a> (3)</li>
	<li><a href="http://www.ghacks.net/2008/02/07/yoggie-pico-personal-mobile-security-computer/" title="Yoggie PICO Personal Mobile Security Computer (February 7, 2008)">Yoggie PICO Personal Mobile Security Computer</a> (3)</li>
	<li><a href="http://www.ghacks.net/2009/10/30/with-ubuntu-9-10-arrives-wubi-9-10/" title="With Ubuntu 9.10 Arrives Wubi 9.10 (October 30, 2009)">With Ubuntu 9.10 Arrives Wubi 9.10</a> (2)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/05/29/troubleshooting-a-maxed-out-linux-hard-drive/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Searching for Files in Linux via Command Line</title>
		<link>http://www.ghacks.net/2009/02/13/searching-for-files-in-linux-via-command-line/</link>
		<comments>http://www.ghacks.net/2009/02/13/searching-for-files-in-linux-via-command-line/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 17:38:29 +0000</pubDate>
		<dc:creator>Jack Wallen</dc:creator>
				<category><![CDATA[Advice]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tutorials Basic]]></category>
		<category><![CDATA[command-line]]></category>
		<category><![CDATA[file search]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[locate]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=10540</guid>
		<description><![CDATA[Being able to search for files is a fairly important aspect of using a computer. Naturally there are a number of ways to accomplish this task. You can use a powerful tool like Beagle (check out my article Enable Beagle Searching in GNOME) or you can use easier, faster command line tools to handle your [...]]]></description>
			<content:encoded><![CDATA[<p>Being able to search for files is a fairly important aspect of using a computer. Naturally there are a number of ways to accomplish this task. You can use a powerful tool like Beagle (check out my article <a title="Beagle" href="http://www.ghacks.net/2009/01/14/enable-beagle-searching-in-gnome/" target="_blank">Enable Beagle Searching in GNOME</a>) or you can use easier, faster command line tools to handle your searching tasks.</p>
<p>There are a couple of searching tools that immediately come to mind to take care of your searching needs. The first tool is <em>locate</em> and the second is <em>find</em>. I much prefer the former tool because it is much faster. But both tools can do the job. Both tools are run from the command line and can be run as either the root or a standard user. Let&#8217;s take a quick look at each.</p>
<p><span id="more-10540"></span><strong>Locate</strong></p>
<p>The <em>locate </em>command does not actually search through the directory hierarchy. What <em>locate</em> does is search through a database for the files you are looking for.  Because of this the search is faster. But because it uses a database that means the database has to be updated in order for new to show up in results (or deleted files to not show up in results). So before you actually start using this command you will want to update the database. In order to update the database used by <em>locate</em> you need to issue the command <em>updatedb</em>. It might be wise to set up a cron job to have the database updated regularly (as most of us won&#8217;t remember to update the database as often as it is necessary.)</p>
<p>Once you have the database updated you are ready to search. The <em>locate </em>command is simple:</p>
<p><em>locate FILENAME</em></p>
<p>(Where <em>FILENAME</em> is the actual name of the file you are searching.</p>
<p>Naturally there are switches you can use with the command. The most useful of these are:</p>
<p>(NOTE: Switches will be proceeded by the &#8220;-&#8221; character.)</p>
<ul>
<li>c &#8211; Instead of writing the resulting names it writes the number of matches found.</li>
<li>d &#8211; Use a different database than the default.</li>
<li>i &#8211; Ignore case</li>
<li>r &#8211; Use a regular expression.</li>
</ul>
<p>The last switch should really raise the eyebrows of the hard core at heart. The <em>locate </em>command can use regular expressions which makes this command VERY useful.</p>
<p><strong>Find</strong></p>
<p>Unlike the <em>locate</em> command, <em>find </em>does search through the filesystem hierarchy. Because of this <em>find</em> is much slower than <em>locate</em>. But also because of this, there is no need to update a database. So the <em>find</em> command always will have the most up-to-date results.</p>
<p>The syntax of the <em>find</em> command is very similar to that of <em>locate.</em></p>
<p><em>find FILENAME</em></p>
<p>Where <em>FILENAME</em> is the actual name of the file name to search.</p>
<p>And, like <em>locate</em> (and nearly every Linux command), there are switches to enhance the usability. The most useful of these switches are:</p>
<p>(NOTE: Switches will be proceeded  by the &#8220;-&#8221; character.)</p>
<ul>
<li>L &#8211; Follow symbolic links</li>
<li>delete &#8211; Will delete the found files.</li>
<li>exec ; <em>COMMAND FILENAME</em>- Will execute the COMMAND on the FILENAME.</li>
</ul>
<p>The <em>find </em>command is actually quite a bit more complex than locate. Because <em>find&#8217;s</em> actually purpose is to examine files (the end results can be found files), <em>find</em> does much more. But for command line file searching, it does perform admirably.</p>
<p><strong>Final Thoughts</strong></p>
<p>My preferences is to use <em>locate.</em> I always use <em>locate</em> before I will use a gui search tool. I trust the results, the results are faster, and often more accurate (so long as I have updated the database.) Give either of these tools a try. You will most likely be happy with the results (unless, of course, you can&#8217;t find the file you&#8217;re trying to locate.)</p>

	Tags: <a href="http://www.ghacks.net/tag/command-line/" title="command-line" rel="tag">command-line</a>, <a href="http://www.ghacks.net/tag/file-search/" title="file search" rel="tag">file search</a>, <a href="http://www.ghacks.net/tag/find/" title="find" rel="tag">find</a>, <a href="http://www.ghacks.net/tag/linux/" title="Linux" rel="tag">Linux</a>, <a href="http://www.ghacks.net/tag/locate/" title="locate" rel="tag">locate</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/06/01/let-catfish-search-for-your-files/" title="Let Catfish search for your files (June 1, 2009)">Let Catfish search for your files</a> (6)</li>
	<li><a href="http://www.ghacks.net/2009/05/29/troubleshooting-a-maxed-out-linux-hard-drive/" title="Troubleshooting a maxed out Linux hard drive (May 29, 2009)">Troubleshooting a maxed out Linux hard drive</a> (7)</li>
	<li><a href="http://www.ghacks.net/2008/02/17/the-fastest-windows-file-search-just-got-better/" title="The fastest Windows File Search just got better (February 17, 2008)">The fastest Windows File Search just got better</a> (14)</li>
	<li><a href="http://www.ghacks.net/2007/11/05/save-and-locate-all-files-on-your-hard-drives-fast/" title="Save and Locate all Files on your hard drives fast (November 5, 2007)">Save and Locate all Files on your hard drives fast</a> (3)</li>
	<li><a href="http://www.ghacks.net/2009/02/18/linux-command-line-fu/" title="Linux Command Line Fu (February 18, 2009)">Linux Command Line Fu</a> (5)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/02/13/searching-for-files-in-linux-via-command-line/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
