<?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: problem with history.. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-history/m-p/3055815#M907653</link>
    <description>And - don't forget to export HISTFILE!!!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 25 Aug 2003 09:32:58 GMT</pubDate>
    <dc:creator>Pete Randall</dc:creator>
    <dc:date>2003-08-25T09:32:58Z</dc:date>
    <item>
      <title>problem with history..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-history/m-p/3055811#M907649</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;my problem is when I enter as a root, I can't recall history (Esc + k).  when I type "history" the output is as bellow:&lt;BR /&gt;&lt;BR /&gt;"sh: fc: Cannot access or open the history file"&lt;BR /&gt;&lt;BR /&gt;but, when I login as another user, it works fine..&lt;BR /&gt;&lt;BR /&gt;can anyone help me with this...?&lt;BR /&gt;&lt;BR /&gt;thanks</description>
      <pubDate>Mon, 25 Aug 2003 09:22:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-history/m-p/3055811#M907649</guid>
      <dc:creator>M. Z. Harbi</dc:creator>
      <dc:date>2003-08-25T09:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: problem with history..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-history/m-p/3055812#M907650</link>
      <description>You first need to export the HISTFILE variable.  For example, this is what we use:&lt;BR /&gt;&lt;BR /&gt;HISTFILE=/tmp/.sh_history.$(whoami)&lt;BR /&gt;&lt;BR /&gt;Then make sure you've done "set -o vi" and that should do it.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 25 Aug 2003 09:29:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-history/m-p/3055812#M907650</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-08-25T09:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: problem with history..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-history/m-p/3055813#M907651</link>
      <description>Harbi,&lt;BR /&gt;  For root the shell is /sbin/sh.  History details are only available with Korn/C shells.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Umapathy</description>
      <pubDate>Mon, 25 Aug 2003 09:30:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-history/m-p/3055813#M907651</guid>
      <dc:creator>Umapathy S</dc:creator>
      <dc:date>2003-08-25T09:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: problem with history..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-history/m-p/3055814#M907652</link>
      <description>HISTFILE=$HOME/.sh_history&lt;BR /&gt;</description>
      <pubDate>Mon, 25 Aug 2003 09:30:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-history/m-p/3055814#M907652</guid>
      <dc:creator>T G Manikandan</dc:creator>
      <dc:date>2003-08-25T09:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: problem with history..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-history/m-p/3055815#M907653</link>
      <description>And - don't forget to export HISTFILE!!!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 25 Aug 2003 09:32:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-history/m-p/3055815#M907653</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-08-25T09:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: problem with history..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-history/m-p/3055816#M907654</link>
      <description>Oops.  I am very sorry for my incomplete reply.  &lt;BR /&gt;&lt;BR /&gt;-Umapathy</description>
      <pubDate>Mon, 25 Aug 2003 09:50:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-history/m-p/3055816#M907654</guid>
      <dc:creator>Umapathy S</dc:creator>
      <dc:date>2003-08-25T09:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: problem with history..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-history/m-p/3055817#M907655</link>
      <description>HISTFILE=/.sh_history&lt;BR /&gt;HISTSIZE=250&lt;BR /&gt;export HISTFILE HISTSIZE&lt;BR /&gt;&lt;BR /&gt;Robert-Jan.&lt;BR /&gt;</description>
      <pubDate>Mon, 25 Aug 2003 09:53:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-history/m-p/3055817#M907655</guid>
      <dc:creator>Robert-Jan Goossens</dc:creator>
      <dc:date>2003-08-25T09:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: problem with history..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-history/m-p/3055818#M907656</link>
      <description>Harbi,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If you run&lt;BR /&gt;&lt;BR /&gt;su root&lt;BR /&gt;&lt;BR /&gt;then you won't have a history file, but if you&lt;BR /&gt;&lt;BR /&gt;su - root&lt;BR /&gt;&lt;BR /&gt;then you will have a history file (if one is set in your /.profile).</description>
      <pubDate>Mon, 25 Aug 2003 18:03:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-history/m-p/3055818#M907656</guid>
      <dc:creator>Robert A. Pierce</dc:creator>
      <dc:date>2003-08-25T18:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: problem with history..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-history/m-p/3055819#M907657</link>
      <description>There is almost no reason why all users should have a HISTFILE.&lt;BR /&gt;&lt;BR /&gt;It help track operator mistakes, all kinds of good things.&lt;BR /&gt;&lt;BR /&gt;I do it in /etc/profile&lt;BR /&gt;&lt;BR /&gt;HISTFILE=$HOME/.sh_history&lt;BR /&gt;HISTSIZE=5000&lt;BR /&gt;&lt;BR /&gt;I know this is similar to other answers, but this is how I do it.&lt;BR /&gt;&lt;BR /&gt;I have had users who were trying to cover their tracks or hide mistakes try and turn it off in their .profile so thats another reason to make it mandatory.  To date no applications have been broken by this policy.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 25 Aug 2003 18:18:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-history/m-p/3055819#M907657</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-08-25T18:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: problem with history..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-history/m-p/3055820#M907658</link>
      <description>Steven,&lt;BR /&gt;&lt;BR /&gt;Good point.&lt;BR /&gt;&lt;BR /&gt;If you have a role account with several users logging in with the same ID, you can keep track of the different histories with something like this:&lt;BR /&gt;&lt;BR /&gt; HDAT=$(date +%y%m%d.%I%M%S)&lt;BR /&gt; HWHO=$(who am I -R | /awkc 6)&lt;BR /&gt; HTTY=$(tty | tr "/" " "|awk '{ print $NF }')&lt;BR /&gt; export HISTFILE=/home/roleacct/.hist/$HDAT.$HTTY.$$.$HWHO.log&lt;BR /&gt;&lt;BR /&gt;This gives you the history files separated by login date, time, tty, process, and hostname/IP address.&lt;BR /&gt;&lt;BR /&gt;Rob</description>
      <pubDate>Mon, 25 Aug 2003 19:14:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-history/m-p/3055820#M907658</guid>
      <dc:creator>Robert A. Pierce</dc:creator>
      <dc:date>2003-08-25T19:14:37Z</dc:date>
    </item>
  </channel>
</rss>

