DEV Community

Discussion on: What are your five most used terminal commands?

Collapse
 
cwrau profile image
Chris Werner Rau
history | \
awk '{CMD[$4]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | \
grep -v "./" | \
column -c3 -s " " -t | \
sort -nr | nl |  head -n 10
     1  478  9.83944%    yay
     2  412  8.48086%    vim
     3  286  5.8872%     ls
     4  263  5.41375%    sudo
     5  257  5.29024%    kubectl

Though this is more representative of which commands I use more uniquely, as I only save new commands into my history, as to not crowd it too much