Shell History

Everyone at Ubuntu Planet seems to show his shell history and I don’t want you to stay unknown about mine. 😉 So here it is:

qense@nott:~$ history|awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn|head
156 sudo
43 cd
22 ls
17 apt-cache
7 ./hugday
7 -
6 mkdir
5 python
5 exit
4 nano

But what the heck does the – command do in that list? Is that a command?
Since sudo is so often used I post the history of root too:

root@nott:/home/qense# history|awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn|head
57 pear
1 sudo
1 man
1 history|awk

A weird thing is that apt-get doesn’t seem to appear in this list, together with a lot of other commands I used as root. But this can probably be explained with the way sudo works. You aren’t root, you just get the permissions. The commands are probably all named sudo, since that’s the first command.

Leave a comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.