<?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: HISTSIZE Shell Variable in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/histsize-shell-variable/m-p/2898318#M104407</link>
    <description>Correct. history is indeed an alias for fc. A really good tool to remember is the 'type' command. So for history:&lt;BR /&gt;&lt;BR /&gt;type history&lt;BR /&gt;history is an exported alias for fc -l&lt;BR /&gt;&lt;BR /&gt;type (and the base command whence) totally obsolete which and whereis because only type and whence will tell you what the shell is going to do with a particular string. For example:&lt;BR /&gt;&lt;BR /&gt;type ls&lt;BR /&gt;ls is an alias for /usr/bin/ls -aF&lt;BR /&gt;&lt;BR /&gt;Hummmm, so if I unalias ls then:&lt;BR /&gt;&lt;BR /&gt;unalias ls&lt;BR /&gt;type ls&lt;BR /&gt;ls is /usr/bin/ls&lt;BR /&gt;&lt;BR /&gt;A lot of Trojan horses will masquerade as a normal command but type will show you is really going to happen. &lt;BR /&gt;&lt;BR /&gt;I get tired of typing 'history' so I do this:&lt;BR /&gt;&lt;BR /&gt;alias h="fc -l"&lt;BR /&gt;&lt;BR /&gt;and then I can type:&lt;BR /&gt;&lt;BR /&gt;h&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;h -50&lt;BR /&gt;&lt;BR /&gt;and see the history quickly.</description>
    <pubDate>Thu, 06 Feb 2003 15:58:41 GMT</pubDate>
    <dc:creator>Bill Hassell</dc:creator>
    <dc:date>2003-02-06T15:58:41Z</dc:date>
    <item>
      <title>HISTSIZE Shell Variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/histsize-shell-variable/m-p/2898308#M104397</link>
      <description>On both HP-UX 11 and 11i systems the root's .profile reflects SHELL=sh, HISTFILE=(the correct path &amp;amp; filename), HISTSIZE=800, HISTSAVE=400. (Other parameters in this file are omitted.)  The root user enters the "history" command and output yields only 16 previous commands.  When the same parameters are run from etc/profile, 26 commands are recalled.  Can anyone explain?  Thank-You.</description>
      <pubDate>Thu, 06 Feb 2003 13:09:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/histsize-shell-variable/m-p/2898308#M104397</guid>
      <dc:creator>Raymond Ford</dc:creator>
      <dc:date>2003-02-06T13:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: HISTSIZE Shell Variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/histsize-shell-variable/m-p/2898309#M104398</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Try these sintax into the root .profile:&lt;BR /&gt;&lt;BR /&gt;EDITOR=vi; export EDITOR&lt;BR /&gt;&lt;BR /&gt;HISTFILE=/.sh_history; export HISTFILE&lt;BR /&gt;HISTSIZE=800; export HISTSIZE&lt;BR /&gt;&lt;BR /&gt;Rgds.</description>
      <pubDate>Thu, 06 Feb 2003 13:17:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/histsize-shell-variable/m-p/2898309#M104398</guid>
      <dc:creator>Jose Mosquera</dc:creator>
      <dc:date>2003-02-06T13:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: HISTSIZE Shell Variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/histsize-shell-variable/m-p/2898310#M104399</link>
      <description>What does HISTSAVE do?&lt;BR /&gt;&lt;BR /&gt;You might have a corrupted history file, try "mv"'ing it and starting over?&lt;BR /&gt;&lt;BR /&gt;Also, after the root user log's in, echo $HISTFILE, $HISTSIZE&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Thu, 06 Feb 2003 13:18:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/histsize-shell-variable/m-p/2898310#M104399</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2003-02-06T13:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: HISTSIZE Shell Variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/histsize-shell-variable/m-p/2898311#M104400</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Make sure that 'EDITOR=vi' and that you have exported your variables.  Verify this with 'env'.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 06 Feb 2003 13:21:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/histsize-shell-variable/m-p/2898311#M104400</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2003-02-06T13:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: HISTSIZE Shell Variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/histsize-shell-variable/m-p/2898312#M104401</link>
      <description>The 3 suggestions above are appreciated and were tested, though they were already in effect in .profile.  Could another env variable or the type of shell we use be a factor? I'm told that "sh" is not Bourne but more of a POSIX shell.  The operating systems were recently upgraded from 10.20.  Could an error have occurred at that stage? Could a kernel setting interfere?  We are still researching to see if problem persists using Korn shell.  Thanks again.</description>
      <pubDate>Thu, 06 Feb 2003 14:02:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/histsize-shell-variable/m-p/2898312#M104401</guid>
      <dc:creator>Raymond Ford</dc:creator>
      <dc:date>2003-02-06T14:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: HISTSIZE Shell Variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/histsize-shell-variable/m-p/2898313#M104402</link>
      <description>It's important to note that HISTSIZE, HISTFILE (and the meaningless variable HISTSAVE) are not part of a standard HP-UX /etc/profile or .profile so some sysadmin has added these values. To get command history working, you need HISTFILE defined (and EDITOR to make sure the expected history shortcuts work as expected).&lt;BR /&gt;&lt;BR /&gt;The man page for sh-posix (and ksh) define the rules about HISTSIZE and the maximum number of displayed commands. Note that multiple shells run by the same user (using the same $HISTFILE) will see a certain amount of conflicts as each shell tries to manage the same history file. If you remove the definition for HISTFILE, you'll get a default history of 128 lines.</description>
      <pubDate>Thu, 06 Feb 2003 14:08:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/histsize-shell-variable/m-p/2898313#M104402</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2003-02-06T14:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: HISTSIZE Shell Variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/histsize-shell-variable/m-p/2898314#M104403</link>
      <description>Terrence,&lt;BR /&gt;&lt;BR /&gt;Serious consequences can result from changing root's shell - if that's what you were implying, don't do it!&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 06 Feb 2003 14:08:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/histsize-shell-variable/m-p/2898314#M104403</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-02-06T14:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: HISTSIZE Shell Variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/histsize-shell-variable/m-p/2898315#M104404</link>
      <description>In HP-UX, the sh shell is a POSIX shell (just like ksh and bash and relatives). To locate the (deprecated) Bourne shell, use /usr/old/bin/sh) but do not change root's shell from /sbin/sh. Standard users get /usr/bin/sh which is the standard POSIX shell in HP-UX. Most Korn shell users cannot tell the difference between the HP-UX POSIX shell (man sh-posix) and ksh except sh-posix has more features (like ulimit -a).</description>
      <pubDate>Thu, 06 Feb 2003 14:11:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/histsize-shell-variable/m-p/2898315#M104404</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2003-02-06T14:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: HISTSIZE Shell Variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/histsize-shell-variable/m-p/2898316#M104405</link>
      <description>To answer Harry, I searched "HISTSAVE" on this site and found "history is not a command but a predefined alias to: fc -l and the man page for sh-posix says that this defaults to -16 (the most recent 16 lines). If you specify a larger history value (ie, history -150) than $HISTSIZE, only the most recent $HISTSIZE lines will be displayed.&lt;BR /&gt;&lt;BR /&gt;I think our problem was not adding the dash before the # of commands we wanted to display!  Will check to see.  Thank-you everyone.&lt;BR /&gt;&lt;BR /&gt;Thanks to all.</description>
      <pubDate>Thu, 06 Feb 2003 14:26:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/histsize-shell-variable/m-p/2898316#M104405</guid>
      <dc:creator>Raymond Ford</dc:creator>
      <dc:date>2003-02-06T14:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: HISTSIZE Shell Variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/histsize-shell-variable/m-p/2898317#M104406</link>
      <description>I use HISTSIZE=50000. Yeah, it can consume some space, but a meg is less than 5 cents anyways so I don't worry about.</description>
      <pubDate>Thu, 06 Feb 2003 15:13:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/histsize-shell-variable/m-p/2898317#M104406</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2003-02-06T15:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: HISTSIZE Shell Variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/histsize-shell-variable/m-p/2898318#M104407</link>
      <description>Correct. history is indeed an alias for fc. A really good tool to remember is the 'type' command. So for history:&lt;BR /&gt;&lt;BR /&gt;type history&lt;BR /&gt;history is an exported alias for fc -l&lt;BR /&gt;&lt;BR /&gt;type (and the base command whence) totally obsolete which and whereis because only type and whence will tell you what the shell is going to do with a particular string. For example:&lt;BR /&gt;&lt;BR /&gt;type ls&lt;BR /&gt;ls is an alias for /usr/bin/ls -aF&lt;BR /&gt;&lt;BR /&gt;Hummmm, so if I unalias ls then:&lt;BR /&gt;&lt;BR /&gt;unalias ls&lt;BR /&gt;type ls&lt;BR /&gt;ls is /usr/bin/ls&lt;BR /&gt;&lt;BR /&gt;A lot of Trojan horses will masquerade as a normal command but type will show you is really going to happen. &lt;BR /&gt;&lt;BR /&gt;I get tired of typing 'history' so I do this:&lt;BR /&gt;&lt;BR /&gt;alias h="fc -l"&lt;BR /&gt;&lt;BR /&gt;and then I can type:&lt;BR /&gt;&lt;BR /&gt;h&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;h -50&lt;BR /&gt;&lt;BR /&gt;and see the history quickly.</description>
      <pubDate>Thu, 06 Feb 2003 15:58:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/histsize-shell-variable/m-p/2898318#M104407</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2003-02-06T15:58:41Z</dc:date>
    </item>
  </channel>
</rss>

