<?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: recall previous command using esc-k in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/recall-previous-command-using-esc-k/m-p/5242220#M676587</link>
    <description>Thanks to everyone for helping.</description>
    <pubDate>Fri, 04 Jun 2010 16:08:28 GMT</pubDate>
    <dc:creator>Joy Conner</dc:creator>
    <dc:date>2010-06-04T16:08:28Z</dc:date>
    <item>
      <title>recall previous command using esc-k</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/recall-previous-command-using-esc-k/m-p/5242208#M676575</link>
      <description>I have a unix system that does not recall previous commands.  What setting do I need to change to enable this?</description>
      <pubDate>Wed, 02 Jun 2010 20:20:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/recall-previous-command-using-esc-k/m-p/5242208#M676575</guid>
      <dc:creator>Joy Conner</dc:creator>
      <dc:date>2010-06-02T20:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: recall previous command using esc-k</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/recall-previous-command-using-esc-k/m-p/5242209#M676576</link>
      <description>If it's a Linux box using bash, or another Unix using ksh.&lt;BR /&gt;&lt;BR /&gt;set EDITOR=vi&lt;BR /&gt;set -o vi&lt;BR /&gt;&lt;NOW use="" your="" esc-k="" command=""&gt;&lt;BR /&gt;&lt;BR /&gt;Try the above without the first line, if it works, great.  If not, try it again with the set EDITOR command.  If you need both, there's your fix.&lt;BR /&gt;&lt;BR /&gt;If it's bash your using then the default history recall command is ctrl-r.  The above changes it to act like ksh.&lt;BR /&gt;&lt;/NOW&gt;</description>
      <pubDate>Wed, 02 Jun 2010 20:35:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/recall-previous-command-using-esc-k/m-p/5242209#M676576</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2010-06-02T20:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: recall previous command using esc-k</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/recall-previous-command-using-esc-k/m-p/5242210#M676577</link>
      <description>This did not work.&lt;BR /&gt;&lt;BR /&gt;The system is HPUX B.11.00 and the user is root.</description>
      <pubDate>Wed, 02 Jun 2010 21:07:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/recall-previous-command-using-esc-k/m-p/5242210#M676577</guid>
      <dc:creator>Joy Conner</dc:creator>
      <dc:date>2010-06-02T21:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: recall previous command using esc-k</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/recall-previous-command-using-esc-k/m-p/5242211#M676578</link>
      <description>type ksh&lt;BR /&gt;then try your esc-k commands, if it doesn't work, then try:&lt;BR /&gt;set -o vi&lt;BR /&gt;then try your esc-k commands, if it doesn't &lt;BR /&gt;work, then try&lt;BR /&gt;set EDITOR=vi; export EDITOR (export shouldn't be necessary, but doesn't hurt).&lt;BR /&gt;&lt;BR /&gt;Then try your esc-k commands, You should be working now.&lt;BR /&gt;&lt;BR /&gt;FYI:  as root, in the default posix shell, you generally don't have history turned on, check HISTSIZE.&lt;BR /&gt;&lt;BR /&gt;echo $HISTSIZE&lt;BR /&gt;&lt;BR /&gt;if this is zero, you don't have history.  When you invoke ksh, you'll read the /etc/profile script, which by default has a HISTORY size setting, so this starts to work.&lt;BR /&gt;&lt;BR /&gt;Alternately, you could just try setting HISTSIZE to something other than zero without using ksh.  Then try esc-k,&lt;BR /&gt;then try setting "-o vi", then try esc-k, then try "set EDITOR=vi",then try esc-k.&lt;BR /&gt;&lt;BR /&gt;When you've finally got a solution working, add the three "set" commands to your ~/.profile in your home directory, which is probably just "/", unless you've changed it.&lt;BR /&gt;&lt;BR /&gt;put this in root's .profile, preferably at the end of the file.&lt;BR /&gt;&lt;BR /&gt;set HISTSIZE=300&lt;BR /&gt;set EDITOR=vi&lt;BR /&gt;set -o vi&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Jun 2010 21:23:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/recall-previous-command-using-esc-k/m-p/5242211#M676578</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2010-06-02T21:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: recall previous command using esc-k</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/recall-previous-command-using-esc-k/m-p/5242212#M676579</link>
      <description>ksh worked.  Thank you.&lt;BR /&gt;&lt;BR /&gt;Does this mean that I need to remember to type this command when ever I want to recall?</description>
      <pubDate>Thu, 03 Jun 2010 11:13:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/recall-previous-command-using-esc-k/m-p/5242212#M676579</guid>
      <dc:creator>Joy Conner</dc:creator>
      <dc:date>2010-06-03T11:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: recall previous command using esc-k</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/recall-previous-command-using-esc-k/m-p/5242213#M676580</link>
      <description>&lt;!--!*#--&gt;&amp;gt; Does this mean that I need to remember to&lt;BR /&gt;&amp;gt; type this command when ever I want to&lt;BR /&gt;&amp;gt; recall?&lt;BR /&gt;&lt;BR /&gt;If you wish to use command-line recall in a&lt;BR /&gt;shell, then you probably need to use a shell&lt;BR /&gt;which does command-line recall.  If the&lt;BR /&gt;normal "root" shell doesn't do it, then you&lt;BR /&gt;might need to run some other shell, like,&lt;BR /&gt;say, "ksh" or "bash".&lt;BR /&gt;&lt;BR /&gt;Changing the default "root" shell on an&lt;BR /&gt;HP-UX system is generally a very bad idea, so&lt;BR /&gt;you may be better off manually running the&lt;BR /&gt;other shell when you log into the HP-UX&lt;BR /&gt;system.</description>
      <pubDate>Thu, 03 Jun 2010 13:21:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/recall-previous-command-using-esc-k/m-p/5242213#M676580</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2010-06-03T13:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: recall previous command using esc-k</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/recall-previous-command-using-esc-k/m-p/5242214#M676581</link>
      <description>OK.  Thank you for your help.</description>
      <pubDate>Thu, 03 Jun 2010 13:41:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/recall-previous-command-using-esc-k/m-p/5242214#M676581</guid>
      <dc:creator>Joy Conner</dc:creator>
      <dc:date>2010-06-03T13:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: recall previous command using esc-k</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/recall-previous-command-using-esc-k/m-p/5242215#M676582</link>
      <description>Joy, just add the commands into root's home directory in the file called .profile, it's probably at the top of the tree at "/.profile".&lt;BR /&gt;&lt;BR /&gt;Put the three "set" commands there, and when you run "ksh" it will run the contents of the ".profile" file.  Oh, yeah and make sure the file is executable for root: "chmod u+x .profile" &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Jun 2010 13:55:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/recall-previous-command-using-esc-k/m-p/5242215#M676582</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2010-06-03T13:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: recall previous command using esc-k</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/recall-previous-command-using-esc-k/m-p/5242216#M676583</link>
      <description>just enter ksh -o vi after you login</description>
      <pubDate>Thu, 03 Jun 2010 15:32:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/recall-previous-command-using-esc-k/m-p/5242216#M676583</guid>
      <dc:creator>stephen peng</dc:creator>
      <dc:date>2010-06-03T15:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: recall previous command using esc-k</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/recall-previous-command-using-esc-k/m-p/5242217#M676584</link>
      <description>My mistake - while what I said will work - the better place to put the "set" commands would be in /.kshrc ; and then make it executable.</description>
      <pubDate>Thu, 03 Jun 2010 17:07:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/recall-previous-command-using-esc-k/m-p/5242217#M676584</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2010-06-03T17:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: recall previous command using esc-k</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/recall-previous-command-using-esc-k/m-p/5242218#M676585</link>
      <description>There is a feature (bug?) in the POSIX shell for root. The .sh_history file (which is required for command recall to work) is not automatically created. This has existed for years but may have finally been fixed. ksh will generate the file when HISTFILE and HISTSIZE have been set.&lt;BR /&gt; &lt;BR /&gt;This is fairly annoying so I always put the EDITOR, HISTFILE and HISTSIZE variables in /etc/profile. Now every user gets the correct settings. Using .profile or .kshrc means that the fix must be applied for every user login on the system.&lt;BR /&gt; &lt;BR /&gt;By the way, set HISTFILE to a reasonable value like 10000 (not 300). The purpose is to log previous commands and being able to recall something from 6 months ago can be a very important requirement.&lt;BR /&gt; &lt;BR /&gt;Now you know how to enable the POSIX shell for command history, change root's shell back to /sbin/sh. As mentioned, ksh will not function in single user mode. The POSIX shell and ksh are virtually identical for most sysadmins.</description>
      <pubDate>Fri, 04 Jun 2010 01:47:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/recall-previous-command-using-esc-k/m-p/5242218#M676585</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2010-06-04T01:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: recall previous command using esc-k</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/recall-previous-command-using-esc-k/m-p/5242219#M676586</link>
      <description>Great advice to clarify &amp;amp; summarize final solution Bill - thank you!</description>
      <pubDate>Fri, 04 Jun 2010 15:49:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/recall-previous-command-using-esc-k/m-p/5242219#M676586</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2010-06-04T15:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: recall previous command using esc-k</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/recall-previous-command-using-esc-k/m-p/5242220#M676587</link>
      <description>Thanks to everyone for helping.</description>
      <pubDate>Fri, 04 Jun 2010 16:08:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/recall-previous-command-using-esc-k/m-p/5242220#M676587</guid>
      <dc:creator>Joy Conner</dc:creator>
      <dc:date>2010-06-04T16:08:28Z</dc:date>
    </item>
  </channel>
</rss>

