top ten commands
Thursday, April 10th, 2008
$ history|awk ‘{a[$2]++ } END{for(i in a){print a[i] ” ” i}}’|sort -rn|head
99 ls
86 cd
52 exit
29 su
20 vim
19 mpc
19 clear
17 mv
14 rm
12 screen
$ history|awk ‘{a[$2]++ } END{for(i in a){print a[i] ” ” i}}’|sort -rn|head
99 ls
86 cd
52 exit
29 su
20 vim
19 mpc
19 clear
17 mv
14 rm
12 screen
this is merely a tip for users that finds themselves routinely opening up a calculator app for trivial calculations. the python interactive interpreter is an excellent alternative for this task and since python is almost always installed in your linux distribution all one has to do is type python in a terminal.
there are two ways of exiting the python interactive interpreter. first is the “exit()†method and the other is “ctrl-dâ€. both ways will successfully exit you out of the python interpreter.