Linux Most used commands on the terminal

Yondaime

Disciple
I found this command on a website, thought I would share it here,
Type the following command in the terminal/konsole:
Code:
$ history | awk '{print $2}' | sort | uniq -c | sort -rn | head
it lists the most used commands along with the number of times it has been used
here is my result
Code:
  83 sudo
     34 cd
     29 ls
     17 fortune
      9 exit
      6 tar
      6 gedit
      5 python
      5 locate
      5 cal
 
208 xm

174 cd

139 ls

78 vi

77 ll

45 exit

32 w

23 dmesg

22 ssh

22 pwd

--- Updated Post - Automerged ---

When does history delete its data?

or How long History keeps the commands in the stack?
 
pinga123 said:
--- Updated Post - Automerged ---

[/COLOR]When does history delete its data?

or How long History keeps the commands in the stack?
HISTSIZE env varialbe decides the Size.Default is 500 lines.
 
Back
Top