Wednesday, March 19, 2008

Linux history command ((( example )))

((( top ten linux commands i've used recently revield by history command )))

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

$ history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n10
((( works for me )))
((( --2008march 10TH ))

((( i used recently )))
     1  28  21.875%   cut
     2  28  21.875%   awk
     3  22  17.1875%  strings
     4  15  11.7188%  grep
     5  5   3.90625%  whereis
     6  5   3.90625%  paste
     7  5   3.90625%  ls
     8  3   2.34375%  nano
     9  3   2.34375%  cat
    10  2   1.5625%   clear
*((( stuff posted @ linux. by examples .com )))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

MORE TIPS.
CODE:
$ history
That will display your terminal history. TO CLEAR yor history file.

$ history -c
MOE TIPS TO FOLLOW

how to use the ps command to probe application processes running on your pc and memory usage.
2008march

No comments: