Whilst skimming my Bash history today looking for an esoteric one liner I’d written earlier I started to ponder what my most used commands were, it’s easy enough to find out! This is actually output from my Mac, not a Linux box, I tricked you 😀
<br /> Chill:~ rus$ history | awk {'print $2'} | sort | uniq -c | sort -nr | head -n 10<br /> 106 ssh<br /> 49 ls<br /> 44 cd<br /> 42 curl<br /> 34 scp<br /> 25 vi<br /> 15 mv<br /> 15 cp<br /> 12 grep<br /> 10 rm<br />
ssh looks to be number one, which is understandable as I do a lot of work on remote machines.. so what does my usage pattern on remote servers look like?
<br /> root@xflipnag2:~# history | awk {'print $2'} | sort | uniq -c | sort -nr | head -n 10<br /> 211 vi<br /> 160 ls<br /> 150 cd<br /> 89 svn<br /> 39 grep<br /> 38 ps<br /> 28 cat<br /> 24 /usr/lib/nagios/plugins/check_http<br /> 24 puppet<br /> 20 puppetapply<br />
This time it really is a Linux box, running OEl6 if you must know! Pretty similar, it’s a monitoring node so recently I’ve been using the check_http command to run some HTTP tests. Puppetapply is an alias of ours to run Puppet in a manner that will make changes, by default it runs noop.
It’s nice to see grep rocking, one of my favourite commands really. Though I’m surprised sed hasn’t shown up anywhere!
What are your 10 most used commands?