What is your the most used command in your shell?
<p>We all use the shell on a daily basis and know, what advantages it has.</p>
has.</p>
<p>I'd like you to post the most used commands you fired up in your shell.</p>
shell.</p>
<p>If you use <strong>Bash</strong>, use this code:</p>
code:</p>
<pre><code>cut -d\ -f 1 ~/.bash_history | sort | uniq -c | sort -rn | head -n 10 | sed 's/.*/ &/g'
</code></pre>
&/g'
</code></pre>
<p>If you use <strong>ZSH</strong>, use this code:</p>
code:</p>
<pre><code>history 1| awk '{print $2}' | sort | uniq -c | sort -rn | head -n10
</code></pre>
-n10
</code></pre>
<p>My Top 10 on a Subversion server is the following:</p>
following:</p>
<pre><code> 135 cd
cd
113 ll
ll
73 vim
vim
59 less
less
56 ls
ls
50 ps
ps
47 svnadmin
svnadmin
47 df
df
36 rm
rm
33 top
</code></pre>
top
</code></pre>
<p>Now post your own!<br>
own!<br>
<strong>Note:</strong> Please put 4 spaces in front of every row or click on the "Code" button (labeled with <code>101010</code>). This makes your listing more readable.</p>
readable.</p>
<p>Inspired by <a href="http://www.reddit.com/r/linux/comments/bmlg3/the_most_used_unix_commands/" rel="nofollow">reddit.com</a>. This question is marked as <img src="http://linuxexchange.org/faq" alt="community wiki">, so I'm not a reputation whore.</p>
whore.</p>
<p>I learned you can close a shell without typing <code>exit</code>. Just press <kbd>Ctrl</kbd>+<kbd>D</kbd>!</p>