<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Locate on Raveen Kumar</title>
    <link>https://raveenkumar.com/tags/locate/</link>
    <description>Recent content in Locate on Raveen Kumar</description>
    <generator>Hugo</generator>
    <language>en-US</language>
    <copyright>Raveen Kumar</copyright>
    <lastBuildDate>Sat, 18 Feb 2023 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://raveenkumar.com/tags/locate/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Locate</title>
      <link>https://raveenkumar.com/library/programming/locate/</link>
      <pubDate>Sat, 18 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/programming/locate/</guid>
      <description>&lt;h2 id=&#34;description&#34;&gt;Description&lt;/h2&gt;&#xA;&lt;p&gt;Locate is a alternative to find for files.&#xA;Locate uses &lt;code&gt;updatedb&lt;/code&gt; command to update its database.&#xA;Note that we must run the &lt;code&gt;updatedb&lt;/code&gt; command everytime there is file&#xA;system change.&lt;/p&gt;&#xA;&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;&#xA;&lt;h3 id=&#34;create-a-database&#34;&gt;Create a database&lt;/h3&gt;&#xA;&lt;pre&gt;&lt;code&gt;updatedb&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h3 id=&#34;locate-files&#34;&gt;Locate files&lt;/h3&gt;&#xA;&lt;pre&gt;&lt;code&gt;locate filename&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h3 id=&#34;create-a-database-locally&#34;&gt;Create a database locally&lt;/h3&gt;&#xA;&lt;pre&gt;&lt;code&gt;updatedb_path=&amp;quot;$HOME/.local/locate_db&amp;quot;&#xA;updatedb_home=&amp;quot;$updatedb_path/home.db&amp;quot;&#xA;updatedb -l 0 -o &amp;quot;$updatedb_home&amp;quot; -U ~/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h3 id=&#34;locate-files-for-locally-created-database&#34;&gt;Locate files for locally created database&lt;/h3&gt;&#xA;&lt;pre&gt;&lt;code&gt;locate -d &amp;quot;$updatedb_home&amp;quot;&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
  </channel>
</rss>
