Archive for the 'tip' Category

top ten commands

Thursday, April 10th, 2008

[Thu Apr 10 20:51:48] ~
$ 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

using the python interpreter as a calculator

Saturday, February 2nd, 2008

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.