<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Nerdia</title>
    <description>The latest articles on DEV Community by Nerdia (@nerdia).</description>
    <link>https://dev.to/nerdia</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F1311%2F471d2c29-d186-4ba0-8840-f50b48255b29.jpg</url>
      <title>DEV Community: Nerdia</title>
      <link>https://dev.to/nerdia</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nerdia"/>
    <language>en</language>
    <item>
      <title>How to walk through the file system faster</title>
      <dc:creator>Max Koshel</dc:creator>
      <pubDate>Tue, 15 Oct 2019 08:09:13 +0000</pubDate>
      <link>https://dev.to/nerdia/how-to-walk-through-the-file-system-faster-3a2l</link>
      <guid>https://dev.to/nerdia/how-to-walk-through-the-file-system-faster-3a2l</guid>
      <description>&lt;p&gt;How much time do you spend surfing through the file system? Some people might prefer the visual interface over the console one or use a Norton Commander analogue. Or maybe someone has even configured autocompletion in their favorite console shell, but navigating through directories still hurts. A little magic, falks...&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fasd&lt;/em&gt; is a utility that serves to significantly improve the performance of the command line usage. Allows to receive fast access to files and directories. Now your navigation through the file system will be much faster, no matter what directory you are in.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fasd&lt;/em&gt; by default is delivered with a number of aliases.&lt;/p&gt;

&lt;p&gt;Go to the directory, in the path of which there is a substring &lt;em&gt;abc&lt;/em&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;z abc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Equivalent to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /home/user/path/to/abcdef
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open a file to which you no longer remember the path &lt;em&gt;/you/dont/remember/where/english_paper.pdf&lt;/em&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;o eng paper
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also use &lt;em&gt;fasd&lt;/em&gt; to pass the file path to any other command.&lt;/p&gt;

&lt;p&gt;For example, open the file &lt;em&gt;/etc/rc.local&lt;/em&gt; in the &lt;em&gt;vim&lt;/em&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;vim &lt;span class="sb"&gt;`&lt;/span&gt;f rc lo&lt;span class="sb"&gt;`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or move the file &lt;em&gt;default&lt;/em&gt; to the directory &lt;em&gt;/etc/nginx/sites-available&lt;/em&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;mv &lt;/span&gt;default &lt;span class="sb"&gt;`&lt;/span&gt;d avail&lt;span class="sb"&gt;`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Take a look at this small gif example of how to use it:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--80H3h3CJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://nerdia.io/43ed935699f6bd8c826dae5157a27d92/fasd.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--80H3h3CJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://nerdia.io/43ed935699f6bd8c826dae5157a27d92/fasd.gif" alt="fasd usage example"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How does &lt;em&gt;fasd&lt;/em&gt; work? The first time you run &lt;em&gt;fasd&lt;/em&gt;, it adds a hook, which will be executed on any command. The hook will scan your command arguments and determine if they refer to existing files or directories. If so, the &lt;em&gt;fasd&lt;/em&gt; will add them to its database.&lt;/p&gt;

&lt;p&gt;The utility uses &lt;a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Places/Frecency_algorithm"&gt;frecency algorithm&lt;/a&gt; to understand which of the saved options to return from database. &lt;em&gt;Frecency&lt;/em&gt; is a combination of the two concepts &lt;em&gt;frequency&lt;/em&gt; and &lt;em&gt;recency&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fasd&lt;/em&gt; has a number of useful and convenient settings, as well as additional features. More detailed information in the &lt;a href="https://github.com/clvv/fasd"&gt;github repository&lt;/a&gt; of the utility.&lt;/p&gt;

&lt;p&gt;It's worth a try and you'll forget about visual file managers!&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>todayilearned</category>
      <category>bash</category>
      <category>unix</category>
    </item>
  </channel>
</rss>
