[Discuss] Reviewing history command output for productivity
R. McFarlane
techie at mcfarlanecomputing.net
Mon Sep 25 11:19:49 PDT 2006
Lloyd D Budd wrote:
> Review your history is a Linux productivity tip making the rounds.
>
> http://www.lifehacker.com/software/unix/review-your-most-oftused-unix-commands-202712.php
>
> originally from
> http://www-128.ibm.com/developerworks/aix/library/au-productivitytips.html?ca=dgr-lnxw07UNIX-Office-Tips
>
>
> The command they are recommending is:
> history|awk '{print $2}'|awk 'BEGIN {FS="|"} {print $1}'|sort|uniq
> -c|sort -n
>
> Well, I use bash in multiple terminal windows, so how do the histories
> for the various terminals interact?
>
> For most re-occurring longer commands I access them through ctrl-R as
> opposed to an alias or function.
I too simply use the "reverse search" shortcut, but it is hindered by
the history buffer limit. If you history only stores the last 1000
commands and it was the 1001 command you needed, you are out of luck. :(
I am not sure if this is doable, but it sure would be nice if the bash
history was live updating. This way, when I have multiple windows open
and I do a "reverse search", I can get to the command from any window.
In addition, it would be nice if my bash history and screen history
were all one. Again, this would simplify searching my command history.
Anyone have any solutions for this?
More information about the Discuss
mailing list