Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get Bash command history statistics, like the most used commands in the last 6 months?

Tags:

bash

How can I see, for example, what are my most used commands in the last 6 months in bash? Can I store this data somewhere?

like image 389
Kevin Burke Avatar asked Jun 15 '11 08:06

Kevin Burke


1 Answers

history|awk '{print $2}'|awk 'BEGIN {FS="|"} {print $1}'|sort|uniq -c|sort -rn|head -30

From a thread on the Arch Linux boards

like image 147
jasonwryan Avatar answered Nov 15 '22 19:11

jasonwryan