<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Alias on Amit Agarwal Linux Blog</title>
    <link>/tags/alias/</link>
    <description>Recent content in Alias on Amit Agarwal Linux Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Mon, 30 Dec 2019 01:04:29 +0000</lastBuildDate>
    
	<atom:link href="/tags/alias/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>Get the git url of current repo in clipboard</title>
      <link>/2019/12/30/git-url-current-repo-clipboard/</link>
      <pubDate>Mon, 30 Dec 2019 01:04:29 +0000</pubDate>
      
      <guid>/2019/12/30/git-url-current-repo-clipboard/</guid>
      <description>&lt;p&gt;Lot of times, I just want to copy the git url to clipboard. This is so common in my flow of work that I created an alias for it. Here it is:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;alias git-url=&#34;cat .git/config|awk &#39;/url/ {print $3}&#39;|xclip -i -selection clipboard&#34;&lt;/pre&gt;</description>
    </item>
    
    <item>
      <title>ssh – remove offending key.</title>
      <link>/2016/04/04/ssh-remove-offending-key/</link>
      <pubDate>Mon, 04 Apr 2016 01:05:25 +0000</pubDate>
      
      <guid>/2016/04/04/ssh-remove-offending-key/</guid>
      <description>&lt;p&gt;Whenever a system/server is re-installed or the host key changed for any reason, you would have seen the “host key verification failed”. And as usual you would have to go to known_hosts file and delete the offending key. I will show you 2 simple ways to do this here.&lt;/p&gt;
&lt;p&gt;The output that you get in such scenario is:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Offending ECDSA key in ~/.ssh/known_hosts:4&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;First, you can use sed to directly delete the offending key with a command like this :&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>bashrc with lots of functions and useful alias</title>
      <link>/2013/10/30/bashrc-lots-functions-alias/</link>
      <pubDate>Wed, 30 Oct 2013 00:55:11 +0000</pubDate>
      
      <guid>/2013/10/30/bashrc-lots-functions-alias/</guid>
      <description>&lt;p&gt;Here is a link of a useful 10K lines bashrc&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://pastebin.com/LEkXXuST&#34;&gt;http://pastebin.com/LEkXXuST&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You may not want to put the whole thing, but get an idea and use what you think can be helpful to you or at-least get an idea. This was not posted by me, so if you are re-using code as is, check the permissions to copy.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Pimp your ls</title>
      <link>/2010/05/27/pimp-your-ls/</link>
      <pubDate>Thu, 27 May 2010 11:44:41 +0000</pubDate>
      
      <guid>/2010/05/27/pimp-your-ls/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Here are some of the things that you can do with your ls command.&lt;/p&gt;
&lt;p&gt;First off you can use alias&amp;amp;#8217;s to help you type the most typical ls commands. I will give you some examples:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;alias ls =&amp;amp;#8221;ls –color –classify&amp;amp;#8221;&lt;br&gt;
alias ls.=&amp;amp;#8221;ls -d .*&amp;amp;#8221;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Very commonly used :&lt;/p&gt;
&lt;blockquote&gt;
&lt;div class=&#34;codecolorer-container text solarized-light&#34; style=&#34;overflow:auto;white-space:nowrap;width:550px;&#34;&gt;
  &lt;table cellspacing=&#34;0&#34; cellpadding=&#34;0&#34;&gt;
    &lt;tr&gt;
      &lt;td class=&#34;line-numbers&#34;&gt;
        &lt;div&gt;
          1&lt;br /&gt;2&lt;br /&gt;
        &lt;/div&gt;
      &lt;/td&gt;
&lt;pre&gt;&lt;code&gt;  &amp;lt;td&amp;gt;
    &amp;lt;div class=&amp;quot;text codecolorer&amp;quot;&amp;gt;
      alias ll=&amp;quot;ls -lhvrt&amp;quot;&amp;lt;br /&amp;gt; lsd=&amp;quot;ls -lUd */&amp;quot; # List directories only
    &amp;lt;/div&amp;gt;
  &amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
  &lt;/table&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;p&gt;And after all this you can download the l script from pixelbeat. Quite interesting:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Know when you will type :q in your term instead of vi(m), the alias will chewed you out.</title>
      <link>/2009/12/20/know-when-you-will-type-q-in-your-term-instead-of-vim-the-alias-will-chewed-you-out/</link>
      <pubDate>Sun, 20 Dec 2009 07:53:47 +0000</pubDate>
      
      <guid>/2009/12/20/know-when-you-will-type-q-in-your-term-instead-of-vim-the-alias-will-chewed-you-out/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;most simple solution is to alias :q like so:&lt;br&gt;
alias :q=`echo &amp;amp;#8221;This is not vim&amp;amp;#8221;`&lt;/p&gt;
&lt;p&gt;but as someone suggested in commandlinefu, you can use tput to put some color and fun into this.&lt;br&gt;
alias :q=&amp;amp;#8217;tput setaf 1; echo &amp;gt;&amp;amp;2 &amp;amp;#8221;this is NOT vi(m) :/&amp;amp;#8221;; tput sgr0&amp;amp;#8217;&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>
