<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: command history recall in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/command-history-recall/m-p/2913772#M933840</link>
    <description>You may have to set the variable:&lt;BR /&gt;&lt;BR /&gt;EDITOR=vi; export EDITOR&lt;BR /&gt;&lt;BR /&gt;also, make sure you are the owner of the .sh_history file and read/write permissions are set for the owner.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;Marty</description>
    <pubDate>Thu, 27 Feb 2003 16:41:47 GMT</pubDate>
    <dc:creator>Martin Johnson</dc:creator>
    <dc:date>2003-02-27T16:41:47Z</dc:date>
    <item>
      <title>command history recall</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-history-recall/m-p/2913764#M933832</link>
      <description>I am trying to set up command history recall on my HP C3600 Worstations.  When I type &lt;CTRL&gt;K to recall the previous command, all I see on the screen is ^[K.  What do I need to set up to capture the &lt;CTRL&gt;?&lt;/CTRL&gt;&lt;/CTRL&gt;</description>
      <pubDate>Wed, 26 Feb 2003 14:05:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-history-recall/m-p/2913764#M933832</guid>
      <dc:creator>Chris Conrad</dc:creator>
      <dc:date>2003-02-26T14:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: command history recall</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-history-recall/m-p/2913765#M933833</link>
      <description>Normally its ESCAPE-k  to recally your command. As long as your have HISTFILE set up and a set -o vi command done (in your .profile) then ESC-k should work fine.</description>
      <pubDate>Wed, 26 Feb 2003 14:15:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-history-recall/m-p/2913765#M933833</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2003-02-26T14:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: command history recall</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-history-recall/m-p/2913766#M933834</link>
      <description>If history function is configured, [ESC] [k] will recall the commands.&lt;BR /&gt;&lt;BR /&gt;To configure history function, please do following:&lt;BR /&gt;&lt;BR /&gt;# vi .profile&lt;BR /&gt;...&lt;BR /&gt;       HISTSIZE=500&lt;BR /&gt;       HISTFILE=.sh_history&lt;BR /&gt;       export HISTSIZE HISTFILE&lt;BR /&gt;EDITOR=vi&lt;BR /&gt;export EDITOR&lt;BR /&gt;&lt;BR /&gt;# touch $HOME/.sh_history&lt;BR /&gt;&lt;BR /&gt;After re-read the .profile you should be able to get the history function.</description>
      <pubDate>Wed, 26 Feb 2003 14:22:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-history-recall/m-p/2913766#M933834</guid>
      <dc:creator>Armin Feller</dc:creator>
      <dc:date>2003-02-26T14:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: command history recall</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-history-recall/m-p/2913767#M933835</link>
      <description>there must be something you have to set up in the terminal settings to capture the escape key before it goes to the screen, because it just shows up as ^[k</description>
      <pubDate>Wed, 26 Feb 2003 14:25:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-history-recall/m-p/2913767#M933835</guid>
      <dc:creator>Chris Conrad</dc:creator>
      <dc:date>2003-02-26T14:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: command history recall</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-history-recall/m-p/2913768#M933836</link>
      <description>Your HISTFILE should be setup as &lt;BR /&gt;HISTFILE=${HOME}/.sh_history&lt;BR /&gt;Then make sure the file is created&lt;BR /&gt;touch ${HOME}/.sh_history&lt;BR /&gt;&lt;BR /&gt;Keep in mind, this history recall is for sh and ksh only. If you are using csh, you recall history using '!'. &lt;BR /&gt;&lt;BR /&gt;Good Luck.&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Wed, 26 Feb 2003 17:54:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-history-recall/m-p/2913768#M933836</guid>
      <dc:creator>Steve Labar</dc:creator>
      <dc:date>2003-02-26T17:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: command history recall</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-history-recall/m-p/2913769#M933837</link>
      <description>Hi, if your terminal is not well configured you could try with the c-shell, type in&lt;BR /&gt;csh&lt;BR /&gt;and then yo can view the history with the history command.&lt;BR /&gt;To repeat the last command just type !!, and to repeat another one just type !n, when n is the number showed in the history command.&lt;BR /&gt;&lt;BR /&gt;Frank.</description>
      <pubDate>Wed, 26 Feb 2003 18:18:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-history-recall/m-p/2913769#M933837</guid>
      <dc:creator>Francisco J. Soler</dc:creator>
      <dc:date>2003-02-26T18:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: command history recall</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-history-recall/m-p/2913770#M933838</link>
      <description>"ksh -io vi" command allows you recalling commands and altering using vi commands.&lt;BR /&gt;You may put the same in profile.&lt;BR /&gt;&lt;BR /&gt;-Vijay &lt;BR /&gt;</description>
      <pubDate>Thu, 27 Feb 2003 14:51:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-history-recall/m-p/2913770#M933838</guid>
      <dc:creator>K.Vijayaragavan.</dc:creator>
      <dc:date>2003-02-27T14:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: command history recall</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-history-recall/m-p/2913771#M933839</link>
      <description>Hi Chris,&lt;BR /&gt;&lt;BR /&gt;check your login shell&lt;BR /&gt;'env|grep SHELL'&lt;BR /&gt;&lt;BR /&gt;If you have csh it will work like Francisco told, if you have ksh it should work like discribed above.&lt;BR /&gt;&lt;BR /&gt;Volkmar</description>
      <pubDate>Thu, 27 Feb 2003 16:31:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-history-recall/m-p/2913771#M933839</guid>
      <dc:creator>V. Nyga</dc:creator>
      <dc:date>2003-02-27T16:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: command history recall</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-history-recall/m-p/2913772#M933840</link>
      <description>You may have to set the variable:&lt;BR /&gt;&lt;BR /&gt;EDITOR=vi; export EDITOR&lt;BR /&gt;&lt;BR /&gt;also, make sure you are the owner of the .sh_history file and read/write permissions are set for the owner.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;Marty</description>
      <pubDate>Thu, 27 Feb 2003 16:41:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-history-recall/m-p/2913772#M933840</guid>
      <dc:creator>Martin Johnson</dc:creator>
      <dc:date>2003-02-27T16:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: command history recall</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-history-recall/m-p/2913773#M933841</link>
      <description>Stephen mentioned adding a line to your .profile; no one else has mentioned it, but I have found it to be needed:&lt;BR /&gt;&lt;BR /&gt;set -o vi&lt;BR /&gt;&lt;BR /&gt;I'm not sure quite what the interaction is between setting the EDITOR=vi variable, and using the 'set -o vi' command, I have both in my .profile (too superstitious to leave either out).  But, as I recall, the 'set' command was what did the trick to get &lt;ESC-K&gt; to bring back history of commands.  Plus all the other things that have been mentioned (like, you have to set the HIST... variables, and the history file you set in a variable has to exist).&lt;BR /&gt;&lt;BR /&gt;One point about the &lt;ESC&gt; sequence, once you get vi correctly set up as your line editor: once you hit &lt;ESC&gt;, you are in 'vi edit mode'.  So, if you realize you left a word out of a long command, you hit &lt;ESC&gt;, and then use the 'h' key (cursor left, in vi) to move back to that spot, then hit 'i' to enter insert mode, add what you need, and then enter the whole command line with a &lt;CR&gt;.  &lt;BR /&gt;&lt;BR /&gt;Other vi functions work when you are in 'vi mode', such as a '/' to search back through your command history, rather than just going back sequentially, etc.  All your favorite 'vi' functions, like 'cw' to change a word, or 'dw' to delete a word, can be used once you hit &lt;ESC&gt;.  &lt;BR /&gt;&lt;BR /&gt;I couldn't live without it, and it is one of the first things I get set up, when I have to work on a unix system that doesn't do this... which poses a bit of a problem on Solaris, or Linux, where setting this up is different.&lt;BR /&gt;&lt;BR /&gt;Hope it helps...  --bmr&lt;/ESC&gt;&lt;/CR&gt;&lt;/ESC&gt;&lt;/ESC&gt;&lt;/ESC&gt;&lt;/ESC-K&gt;</description>
      <pubDate>Thu, 27 Feb 2003 23:36:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-history-recall/m-p/2913773#M933841</guid>
      <dc:creator>Brian M Rawlings</dc:creator>
      <dc:date>2003-02-27T23:36:28Z</dc:date>
    </item>
  </channel>
</rss>

