<?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: History command in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622253#M377680</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;# echo $SHELL&lt;BR /&gt;/sbin/sh&lt;BR /&gt; m using shell.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Dev</description>
    <pubDate>Thu, 22 Apr 2010 11:35:18 GMT</pubDate>
    <dc:creator>DKC</dc:creator>
    <dc:date>2010-04-22T11:35:18Z</dc:date>
    <item>
      <title>History command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622236#M377663</link>
      <description>Hi Flock,&lt;BR /&gt;&lt;BR /&gt;I am working in HPVM machine, OS 11.31 and I want to see previous command for that i am given history command but i got error.&lt;BR /&gt;# history&lt;BR /&gt;sh: fc: Cannot access or open the history file.&lt;BR /&gt;&lt;BR /&gt;Anyone can assist me why history command are not working.&lt;BR /&gt;&lt;BR /&gt;Thanks &amp;amp; Regards,&lt;BR /&gt;Dev</description>
      <pubDate>Thu, 22 Apr 2010 09:03:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622236#M377663</guid>
      <dc:creator>DKC</dc:creator>
      <dc:date>2010-04-22T09:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: History command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622237#M377664</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Put these variables in your .profile:&lt;BR /&gt;&lt;BR /&gt;export HISTFILE=$HOME/sh_history&lt;BR /&gt;export HISTSIZE=5000&lt;BR /&gt;&lt;BR /&gt;Then, logout and login again and you will have the command history enabled.&lt;BR /&gt;&lt;BR /&gt;Regards,</description>
      <pubDate>Thu, 22 Apr 2010 09:06:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622237#M377664</guid>
      <dc:creator>R.O.</dc:creator>
      <dc:date>2010-04-22T09:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: History command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622238#M377665</link>
      <description>Sorry, missed a dot in front of sh_history: &lt;BR /&gt;&lt;BR /&gt;export HISTFILE=$HOME/.sh_history&lt;BR /&gt;export HISTSIZE=5000&lt;BR /&gt;&lt;BR /&gt;Regards,</description>
      <pubDate>Thu, 22 Apr 2010 09:09:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622238#M377665</guid>
      <dc:creator>R.O.</dc:creator>
      <dc:date>2010-04-22T09:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: History command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622239#M377666</link>
      <description>Hi R.O.&lt;BR /&gt;&lt;BR /&gt;I have done all the task but still a getting error&lt;BR /&gt;Value of TERM has been set to "xterm".&lt;BR /&gt;WARNING:  YOU ARE SUPERUSER !!&lt;BR /&gt;&lt;BR /&gt;#&lt;BR /&gt;#&lt;BR /&gt;# history&lt;BR /&gt;sh: fc: Cannot access or open the history file.&lt;BR /&gt;&lt;BR /&gt;after exporting histsize and histfile i have logout and than login but same error.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Dev</description>
      <pubDate>Thu, 22 Apr 2010 09:21:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622239#M377666</guid>
      <dc:creator>DKC</dc:creator>
      <dc:date>2010-04-22T09:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: History command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622240#M377667</link>
      <description>Is $HOME set?  "echo $HOME" will tell you.&lt;BR /&gt;&lt;BR /&gt;Try setting HISTFILE to a explicit full path name wherever root's home really is, like "HISTFILE=/.sh_history" or "HISTFILE=/root/.sh_history".&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 22 Apr 2010 09:25:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622240#M377667</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2010-04-22T09:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: History command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622241#M377668</link>
      <description>Hi Pete,&lt;BR /&gt;&lt;BR /&gt;echo $ HOME&lt;BR /&gt;/&lt;BR /&gt;&lt;BR /&gt;After that i have given HISTFILE=/root/.sh_history&lt;BR /&gt;&lt;BR /&gt;but still i am facing error.&lt;BR /&gt;&lt;BR /&gt;# history&lt;BR /&gt;sh: fc: Cannot access or open the history file.&lt;BR /&gt; &lt;BR /&gt;Regards,&lt;BR /&gt;Dev</description>
      <pubDate>Thu, 22 Apr 2010 10:37:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622241#M377668</guid>
      <dc:creator>DKC</dc:creator>
      <dc:date>2010-04-22T10:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: History command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622242#M377669</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Are you setting HISTFILE &amp;amp; HISTSIZE in the user's .profile ? &lt;BR /&gt;&lt;BR /&gt;Regards,</description>
      <pubDate>Thu, 22 Apr 2010 10:40:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622242#M377669</guid>
      <dc:creator>R.O.</dc:creator>
      <dc:date>2010-04-22T10:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: History command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622243#M377670</link>
      <description>If you set&lt;BR /&gt;&lt;BR /&gt;HISTFILE=/root/.sh_history&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;do you have&lt;BR /&gt;&lt;BR /&gt;/root ???</description>
      <pubDate>Thu, 22 Apr 2010 10:44:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622243#M377670</guid>
      <dc:creator>Torsten.</dc:creator>
      <dc:date>2010-04-22T10:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: History command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622244#M377671</link>
      <description>If "echo $HOME" tells you /, as you say, then you should not be setting HISTFILE to /root/.sh_history.  Set it to /.sh_history and try again.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 22 Apr 2010 10:54:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622244#M377671</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2010-04-22T10:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: History command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622245#M377672</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;No, I haven't set in users profile.&lt;BR /&gt;&lt;BR /&gt;I am root user and want to previous command with the help of history command. For that i done export HISTFILE=/root/.sh_history&lt;BR /&gt;          HISTFILE=500&lt;BR /&gt;Than logout than again login with root use but after giveing history command same error.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Dev&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 22 Apr 2010 10:55:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622245#M377672</guid>
      <dc:creator>DKC</dc:creator>
      <dc:date>2010-04-22T10:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: History command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622246#M377673</link>
      <description>Again, if you set it to be in directory /root&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;this directory&lt;BR /&gt;&lt;BR /&gt;/root&lt;BR /&gt;&lt;BR /&gt;must exist!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Does it???</description>
      <pubDate>Thu, 22 Apr 2010 10:59:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622246#M377673</guid>
      <dc:creator>Torsten.</dc:creator>
      <dc:date>2010-04-22T10:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: History command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622247#M377674</link>
      <description>...apart from the fact that directory "/root" must exist, if you don't set the variables in your ".profile", when you logout you lost the changes in the variables. Put these lines in your .profile:&lt;BR /&gt;&lt;BR /&gt;export HISTFILE=/.sh_history (if your home is "/"; is it is /root and it exists, put /root/.sh_history)&lt;BR /&gt;export HISTFILE=5000&lt;BR /&gt;&lt;BR /&gt;Then, try again by logout/login.&lt;BR /&gt;&lt;BR /&gt;Regards,</description>
      <pubDate>Thu, 22 Apr 2010 11:04:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622247#M377674</guid>
      <dc:creator>R.O.</dc:creator>
      <dc:date>2010-04-22T11:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: History command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622248#M377675</link>
      <description>What shell are you using?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 22 Apr 2010 11:11:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622248#M377675</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2010-04-22T11:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: History command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622249#M377676</link>
      <description>There is a dumb bug in root's shell that will not create the history file automatically. Ordinary users are fine but just in case, the commands (which I put in /etc/profile so everyone gets a history file) are:&lt;BR /&gt; &lt;BR /&gt;umask 022&lt;BR /&gt;touch $HOME/.sh_history&lt;BR /&gt;export HISTORY=$HOME/.sh_history&lt;BR /&gt;export HISTFILE=5000&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; $HOME=/&lt;BR /&gt; &lt;BR /&gt;A very bad default location for root's $HOME. Create a separate /root directory and move all of root's files to /root, then change /etc/passwd so the $HOME directory is /root and not /, like this:&lt;BR /&gt;&lt;BR /&gt;root:*:0:3:root user:/root:/sbin/sh&lt;BR /&gt; &lt;BR /&gt;If you move root's $HOME on every Unix platform you have, you may avoid a total disaster in joining the rm -r * club.</description>
      <pubDate>Thu, 22 Apr 2010 11:11:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622249#M377676</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2010-04-22T11:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: History command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622250#M377677</link>
      <description>I agree, it is IMHO a good practice to change root's home from / to something like /root.&lt;BR /&gt;&lt;BR /&gt;If you simply export these variables and then logout, the change is gone. You need to write it to .profile to make it permanent and working.</description>
      <pubDate>Thu, 22 Apr 2010 11:25:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622250#M377677</guid>
      <dc:creator>Torsten.</dc:creator>
      <dc:date>2010-04-22T11:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: History command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622251#M377678</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;# history&lt;BR /&gt;sh: fc: Cannot access or open the history file.&lt;BR /&gt;# pwd&lt;BR /&gt;/&lt;BR /&gt;#&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;after exporting HISTFILE AND HISTSIZE logout than login same problem. You tell me from my side what infomation required, so history command work.&lt;BR /&gt;&lt;BR /&gt;Dev</description>
      <pubDate>Thu, 22 Apr 2010 11:26:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622251#M377678</guid>
      <dc:creator>DKC</dc:creator>
      <dc:date>2010-04-22T11:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: History command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622252#M377679</link>
      <description>Meanwhile many people wrote the very same several times - just follow the advises.</description>
      <pubDate>Thu, 22 Apr 2010 11:29:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622252#M377679</guid>
      <dc:creator>Torsten.</dc:creator>
      <dc:date>2010-04-22T11:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: History command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622253#M377680</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;# echo $SHELL&lt;BR /&gt;/sbin/sh&lt;BR /&gt; m using shell.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Dev</description>
      <pubDate>Thu, 22 Apr 2010 11:35:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622253#M377680</guid>
      <dc:creator>DKC</dc:creator>
      <dc:date>2010-04-22T11:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: History command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622254#M377681</link>
      <description>"after exporting HISTFILE AND HISTSIZE logout than login same problem"&lt;BR /&gt;&lt;BR /&gt;If you do not put these in root's ".profile" you will lose the variables each time you log out of the system......&lt;BR /&gt;&lt;BR /&gt;Regards,</description>
      <pubDate>Thu, 22 Apr 2010 11:37:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622254#M377681</guid>
      <dc:creator>R.O.</dc:creator>
      <dc:date>2010-04-22T11:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: History command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622255#M377682</link>
      <description>As said, add&lt;BR /&gt;&lt;BR /&gt;export HISTFILE=/root/.sh_history&lt;BR /&gt;export HISTSIZE=5000&lt;BR /&gt;&lt;BR /&gt;to your .profile and do&lt;BR /&gt;&lt;BR /&gt;# mkdir /root&lt;BR /&gt;&lt;BR /&gt;logout and back in.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;To change root's home, modify /etc/passwd.</description>
      <pubDate>Thu, 22 Apr 2010 11:38:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/history-command/m-p/4622255#M377682</guid>
      <dc:creator>Torsten.</dc:creator>
      <dc:date>2010-04-22T11:38:11Z</dc:date>
    </item>
  </channel>
</rss>

