My favourite linux commands
April 17, 2008As everyone else doing it…
On my laptop with Ubuntu 7.0.4
me@mylaptop:~$ history | awk '{a[$2]++}END{for(i in a){print a[i] \" \" i}}' | sort -rn | head
215 sudo
55 ls
47 cd
22 ssh
20 apt-cache
11 cat
10 df
9 ps
8 route
8 rename
On a server with Ubuntu 6.0.6:
me@aserver:~$ history | awk '{a[$2]++}END{for(i in a){print a[i] \" \" i}}' | sort -rn | head
104 ls
77 cd
27 sudo
24 last|head
18 screen
18 df
11 mv
11 less
8 tail
7 w
Yes, I’am too lazy typing those commands, and yes I’m a little bit worry about my disk space…

