<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Ruslan&#39;s Tech Blog</title>
    <link>https://blog.bekenev.net/tags/terminal.html</link>
    <description>Software development related stuff</description>
    <language>en-us</language>
    <lastBuildDate>Sat, 10 Mar 2018 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://blog.bekenev.net/tags/terminal/feed.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Restore terminal printing</title>
      <link>https://blog.bekenev.net/2018/03/10/restore-terminal-printing.html</link>
      <pubDate>Sat, 10 Mar 2018 00:00:00 +0000</pubDate>
      <guid>https://blog.bekenev.net/2018/03/10/restore-terminal-printing.html</guid>
      <description>&lt;p&gt;Hey,&lt;/p&gt;&#xA;&lt;p&gt;sometimes I accidentaly print binary file with &lt;code&gt;cat &amp;lt;thefile.bin&amp;gt;&lt;/code&gt; and my&#xA;terminal is getting broken after that due to printing of some escape characters.&lt;/p&gt;&#xA;&lt;p&gt;To fix it you can use &lt;code&gt;reset&lt;/code&gt; command. Checkout the &lt;code&gt;man reset&lt;/code&gt; to get more info about this command.&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>Terminal tips and tricks</title>
      <link>https://blog.bekenev.net/2017/05/23/terminal-tips-and-tricks.html</link>
      <pubDate>Tue, 23 May 2017 00:00:00 +0000</pubDate>
      <guid>https://blog.bekenev.net/2017/05/23/terminal-tips-and-tricks.html</guid>
      <description>&lt;p&gt;Hey.&lt;/p&gt;&#xA;&lt;p&gt;Below I&amp;rsquo;ve listed couple of ways to use terminal that some people may not know about.&#xA;These &amp;ldquo;technics&amp;rdquo; I use a lot in may daily hacking.&lt;br/&gt;&#xA;So let&amp;rsquo;s start.&lt;/p&gt;&#xA;&lt;h2&gt;CTRL+R&lt;/h2&gt;&#xA;I&#39;m sure you already know that you can travel through command history using ⇧ and ⇩ keys.&#xA;But sometimes the command you&#39;re looking for is far behind in history so you should do something like this&#xA;```&#xA;⇧⇧⇧⇧⇧ damn, I missed it ⇩⇩ here is &lt;enter&gt;&#xA;```&#xA;which is quite annoying.&#xA;&lt;p&gt;&lt;strong&gt;CTRL+R&lt;/strong&gt; allows you to search through command history. &lt;br/&gt;&#xA;Here is the demo:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a target=&#34;_blank&#34; href=&#34;https://blog.bekenev.net/assets/img/ctrl_r.gif&#34;&gt;&lt;img alt=&#34;ctrl+r gif&#34; src=&#34;https://blog.bekenev.net/assets/img/ctrl_r.gif&#34; width=&#34;600px&#34;/&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;You can go deeper in history with the same keystroke (CTRL+R). To go forward in history press &lt;strong&gt;CTRL+S&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;This keystroke I just can&amp;rsquo;t live without and use it all the time.&#xA;&lt;br/&gt;&#xA;&lt;br/&gt;&lt;/p&gt;&#xA;&lt;h2&gt;Movements/Editing&lt;/h2&gt;&#xA;Of course I do not use **CTRL+R** just to find previously entered command&#xA;since it can be easily found with ⇧ key. But, I really do not like to move my hands outside of my keyboard&#39;s&#xA;homerow. Usually all terminals supports emacs keybinding &lt;br/&gt;&#xA;So meet:&#xA;&lt;br/&gt;&#xA;&lt;a target=&#34;_blank&#34; href=&#34;https://blog.bekenev.net/assets/img/arrows.png&#34;&gt;&lt;img alt=&#34;emacs arrows&#34; src=&#34;https://blog.bekenev.net/assets/img/arrows.png&#34; width=&#34;300px&#34;/&gt;&lt;/a&gt;&#xA;&lt;br/&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If you&amp;rsquo;ll replace &lt;strong&gt;CTRL&lt;/strong&gt; with &lt;strong&gt;ALT&lt;/strong&gt; for arrow left/right keys you will be able to follow back and forth word by word.&#xA;&lt;br/&gt;&#xA;&lt;br/&gt;&#xA;&lt;br/&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Here is more tips:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;You can also use &lt;strong&gt;ALT&lt;/strong&gt; key with &lt;strong&gt;BACKSPACE&lt;/strong&gt; which will delete WORD instead of SYMBOL.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;You can remove symbol under cursor with &lt;strong&gt;CTRL+D&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Using &lt;strong&gt;CTRL+A&lt;/strong&gt; will move your cursor to the beginning of the command line&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;CTRL+K&lt;/strong&gt; will remove everything from cursor to the end of command line&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;So, using &lt;strong&gt;CTRL+A&lt;/strong&gt; + &lt;strong&gt;CTRL+K&lt;/strong&gt; removes everything you already entered, which is much faster than long&#xA;press on backspace.&#xA;&lt;br/&gt;&#xA;&lt;br/&gt;&lt;/p&gt;&#xA;&lt;h2&gt;CTRL+L&lt;/h2&gt;&#xA;&lt;p&gt;Just a &lt;strong&gt;clear&lt;/strong&gt; command, which clears your terminal window. I like when my typing happens&#xA;at the top of terminal window 😜 so it is very useful for me.&#xA;I hope it can be something good for you as well.&lt;/p&gt;&#xA;</description>
    </item>
  </channel>
</rss>
