What commands do you use most on command line?

As a daily (hourly) linux user, I use command line tools for almost everything that I do. Opening files, copying, moving, making connections (ssh), starting containers (docker). But what ones do I use most? Here is a little command to find out for yourself.

Find out your top 10:

history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl |  head -n10

My Top 10

1 488  16.1857%    cd
2 425  14.0962%    git
3 371  12.3051%    ssh
4 337  11.1774%    docker
5 335  11.1111%    ls
6 118  3.91376%    aws
7 115  3.81426%    sudo
8 94   3.11774%    code
9 65   2.15589%    docker-compose
10 60   1.99005%    vim

What does this say about me?

Well, first off, I should say that this is not necessarily unexpected. I use cd a lot, which is mainly to move between directories. You can also see that I use docker and docker-compose quite often. And also that almost everything is in git.

Secondly, you can also start to see some preferences. I use aws on command line, both for CloudFormation and getting details back of current infrastructure and actually I don’t use Azure at all on command line. Also, you can see that I use code (VSCode) almost twice as often as vim.

However, there is a glaring omissions? Almost all of my configuration management goes through ansible-playbook however, that is entirely missing?! That is because all of my ansible-playbook commands run through docker, so it sees that I used docker, but not the tools inside the container.

I may look at updating this regularly to see how it evolves.