<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><br></div><div><br></div><div><br></div><br><div><div>On Feb 11, 2014, at 05:41 , Steve VanSlyck <<a href="mailto:s.vanslyck723@gmail.com">s.vanslyck723@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><p dir="ltr">It's easier to press one arrow key a few times than to type out a command phrase.</p></div></blockquote><div><br></div><div><div>These are all excellent tips, many of which I had no idea existed. I always do history | grep foo, or try to arrow back, or if I�m feeling really brave using the bang prefix and hope I get lucky.</div><div><br></div><div>On a related note, one thing I�ve noticed is that the bash history doesn�t seem to be written to disk immediately. Even from within our office, we�re required to VPN into the datacenter before being able to log onto any hosts. The VPN isn�t the most stable thing in the world, nor the are wireless connections we have to use. (They recently moved us to a brand new building and decided during construction that wired connections for employees� desks were an unnecessary expense.) It seems that when my connection gets dropped and the shell is pre-maturely terminated, all the history from that session is gone.</div><div><br></div><div>Is there something I�m missing that will cause this to get written more immediately than on a proper logout? I�ve run into several situations where I really needed to see that history to know what someone else was doing, or where I left off, or what that complex sed command was - but I�m out of luck.</div><div><br></div></div><br><blockquote type="cite"><div><div class="gmail_quote">Jim Wildman <<a href="mailto:jim@rossberry.com">jim@rossberry.com</a>> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail"><br>With bash<br>!?phrase<br>will search for and execute that last command containg phrase<br><br>history | grep apt (as others said) will find the command, with the<br>command number in front<br><br>!number will execute that command<br>!number:s/oldphrase/newphrase/ will edit and then execute the command<br><br>you can do similar things with the 'fc' command which will open your<br>default editor with the given command. The command executes when you<br>exit the editor.<br><br> 983 exit<br> 984 ls<br> 985 ls<br> 986 cd rossdev<br> 987 ls<br> 988 cat rbhosts.txt<br> 989 svn up<br> 990 exit<br> 991 scdr<br> 992 pine<br> 993 screen<br> 994 scdr<br> 995 scdr<br> 996 scdr<br> 997 exit<br> 998 scdr<br> 999 exit<br> 1000 scdr<br> 1001 man fc<br> 1002 history 20<br><br>fc 988<br>opens vi with "cat rbhosts.txt" in the buffer<br><br !="">When I
see someone who only uses the arrow keys, I know they have not<br>gotten serious about efficient command line use.<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> csh (sorry, no idea off the top of my head). <br> <br> Alternately, if you need a reason to use zsh, here's one more: you can type<br> 'apt' and then use the up arrow to reverse through full commands in your<br> history that start with "apt".<br> <br> <br> <br> </blockquote><br><br><hr><br>Jim Wildman, CISSP, RHCE <a href="mailto:jim@rossberry.com">jim@rossberry.com</a> <a href="http://www.rossberry.net/">http://www.rossberry.net</a><br>"Society in every state is a blessing, but Government, even in its best<br>state, is a necessary evil; in its worst state, an intolerable one."<br>Thomas Paine</pre><div style="margin-top: 2.5em; margin-bottom: 1em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(0, 0, 0);"><br class="webkit-block-placeholder"></div><pre class="k9mail"><hr><br>colug-432 mailing list<br><a href="mailto:colug-432@colug.net">colug-432@colug.net</a><br><a href="http://lists.colug.net/mailman/listinfo/colug-432">http://lists.colug.net/mailman/listinfo/colug-432</a><br></pre></blockquote></div><br>
-- <br>
Sent from Kaiten Mail. Please excuse my brevity.</div>_______________________________________________<br>colug-432 mailing list<br><a href="mailto:colug-432@colug.net">colug-432@colug.net</a><br>http://lists.colug.net/mailman/listinfo/colug-432<br></blockquote></div><br></body></html>