Linux is a great thing that it'll keep a history of the commands you time in the ~/.bash_history file. If you'd like to see the 10 top commands you use, you can run something like the following to see what you type out the most!
It should show something like this:
The first column is the number of times it appeared, then it shows the comand typed. That gives a little info on what i've been working on .. looks like i've typed
Change
Edit: change your history length as well as add time/date: https://www.linux.org/threads/add-timestamp-change-history-size-in-your-linux-history.27966/
cat ~/.bash_history | sort |uniq -c|sort -nr|head -n 10
It should show something like this:
Code:
[rob ~ ]$ cat ~/.bash_history | sort |uniq -c|sort -nr|head -n 10
223 ls
78 cd
57 vim domain-search.sh
45 cd ..
39 git status
37 ./domain-search.sh
25 kubectl get pods -A
24 exit
23 pwd
21 git branch
The first column is the number of times it appeared, then it shows the comand typed. That gives a little info on what i've been working on .. looks like i've typed
ls
223 times in my current history file! What does yours say?Change
head -n 10
to another number to get more/less than your 10 most used commands!Edit: change your history length as well as add time/date: https://www.linux.org/threads/add-timestamp-change-history-size-in-your-linux-history.27966/
Last edited: