Which command do I use the most?
After waking to a ringing phone, I was attempting to fall back asleep. As I drifted, I wondered which command I used the most? I thought it a neat exercise, so I found out.
As I type this, I suspect it is ls
. Which is second and third should be interesting.
I gathered up .zsh_history and .bash_history files from 5 different machines I work on a fair bit and put them in a pile, erm, directory.
|
|
Wow! 35 thousand commands. Wait… There’s a snafu in there. SUDO. Hmm….
|
|
Okay. I’ve got some numbers around that…Let’s see about stripping those and get the underlying command.
|
|
Okay. No surprises in the top five. ansible-playbook
surprised me. Didn’t realize I entered that so much. There were more points of interest after the first twenty, but I won’t post those.
Interesting done
showed up in the top twenty. Thinking about this, it makes sense, as the first command is usually input to while, ie:
|
|
No if
or fi
in the top twenty. How about that.
Actually, thinking about this more, there are probably many more missing commands that were piped into another or, say rm
used in an exec
for find
.