<?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: Alfian Ardhi</title>
    <description>The latest articles on DEV Community by Alfian Ardhi (@alfianardhi).</description>
    <link>https://dev.to/alfianardhi</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%2Fuser%2Fprofile_image%2F398114%2F03a467e0-758f-4d95-9699-60d55a552bbc.jpg</url>
      <title>DEV Community: Alfian Ardhi</title>
      <link>https://dev.to/alfianardhi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alfianardhi"/>
    <language>en</language>
    <item>
      <title>How to fix “corrupt history file” in zsh</title>
      <dc:creator>Alfian Ardhi</dc:creator>
      <pubDate>Sat, 08 Jan 2022 07:38:20 +0000</pubDate>
      <link>https://dev.to/alfianardhi/how-to-fix-corrupt-history-file-in-zsh-13of</link>
      <guid>https://dev.to/alfianardhi/how-to-fix-corrupt-history-file-in-zsh-13of</guid>
      <description>&lt;p&gt;I use Z shell or zsh in my computer. A few days ago i get error “corrupt history file”, so how to fix it, follow this step:&lt;/p&gt;

&lt;p&gt;move to home directory&lt;br&gt;
&lt;code&gt;cd ~&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;move the .zsh_history file into another .zsh_history_old file&lt;br&gt;
&lt;code&gt;mv .zsh_history .zsh_history_old&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;write all printable strings into a new .zsh_history file&lt;br&gt;
&lt;code&gt;strings .zsh_history_old &amp;gt; .zsh_history&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;reload the history&lt;br&gt;
&lt;code&gt;fc -R .zsh_history&lt;/code&gt;&lt;/p&gt;

</description>
      <category>zsh</category>
    </item>
    <item>
      <title>Linux Command Line You Need to Know</title>
      <dc:creator>Alfian Ardhi</dc:creator>
      <pubDate>Sat, 26 Jun 2021 18:33:06 +0000</pubDate>
      <link>https://dev.to/alfianardhi/linux-command-line-you-need-to-know-2lgn</link>
      <guid>https://dev.to/alfianardhi/linux-command-line-you-need-to-know-2lgn</guid>
      <description>&lt;p&gt;Whether you are looking to expand skills about linux. So, out of the hundreds of possible Linux commands you could or have to learn. Here some linux command you need to know.&lt;/p&gt;

&lt;h3&gt;
  
  
  Print Working Directory
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;pwd&lt;/code&gt; command for to know you where you are now. For example your’re in download folder. Try the following type pwd and you will see that you’re in your download directory.&lt;/p&gt;

&lt;h3&gt;
  
  
  Clear Terminal Screen (Console)
&lt;/h3&gt;

&lt;p&gt;For Linux you can type &lt;code&gt;clear&lt;/code&gt; or &lt;code&gt;Ctrl+L&lt;/code&gt; to Clear the screen. It works in most terminal.&lt;/p&gt;

&lt;h3&gt;
  
  
  Show Lists Directory Of Contents
&lt;/h3&gt;

&lt;p&gt;Command &lt;code&gt;ls&lt;/code&gt; is equivalent to the DOS dir command, that it show lists files and directories. This command has some common attributes, example like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ls -a&lt;/code&gt; for show all folders and files including visible and hidden.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ls -l&lt;/code&gt; for show the contents of the directory in full, starting from access rights, owner, group and the date the file or directory was created.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ls -i&lt;/code&gt; show directory contents and size.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Troubleshooting
&lt;/h3&gt;

&lt;p&gt;For troubleshooting you can use command &lt;code&gt;tail -f&lt;/code&gt;. Example like this &lt;code&gt;tail -f /var/log/daemon.log&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Show History Commands in Linux
&lt;/h3&gt;

&lt;p&gt;If you want to see the previous commands, you can type &lt;code&gt;history&lt;/code&gt; in your terminal. Meanwhile, to search command history in Linux, press &lt;code&gt;ctrl+R&lt;/code&gt;, then just type the previous command you want to search or use.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>ubuntu</category>
      <category>linuxcommand</category>
    </item>
  </channel>
</rss>
