Reveal your Terminal’s most used Commands

This small piece of code lets you know the top 10 most-used commands in terminal.

$history| awk ‘{print$2}| sort| uniq -c| sort -rn| head -10

We can also do the same using the following code:

$cut -d\ -f1 ~/.bash_history| sort| uniq -c| sort -rn| head -n10| sed ‘s/.*/&/g’
linux
Tweet
blog comments powered byDisqus