4 ms·
I alias "history | grep" to "hrep" and I'd bet it is one of my top 3-5 commands.
by jpwgarrison 12y ago
I alias "history | grep" to "hrep" and I'd bet it is one of my top 3-5 commands.
- spdustin 12y agoWhy not find out: history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head
- scarecrowbob 12y ago:D HA! Nice! 2936 git 1166 cd 409 ll 343 ssh 302 l 279 vagrant 223 ls 201 la 151 cat 140 mkdir
- jakupovic 12y agouniq seems a bit easier to understand here: history | awk '{print $2}' | sort | uniq -c | sort -rn
- barrkel 12y agoWhy not use C-r?
- aaren 12y agoThis could change your life: https://github.com/junegunn/fzf https://github.com/junegunn/fzf It's a fuzzy searcher for Ctrl-r that shows all possible results, updating as you type.
- jpwgarrison 12y agoSometimes that is what I want, but usually I want a list of all the iterations of something to cut/paste/adjust.