<?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 need more teeth into .sh_history file in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711450#M60657</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;How can I get Timestamp info into the .sh_history file?&lt;BR /&gt;&lt;BR /&gt;thanks</description>
    <pubDate>Thu, 25 Apr 2002 20:55:21 GMT</pubDate>
    <dc:creator>Jacob_2</dc:creator>
    <dc:date>2002-04-25T20:55:21Z</dc:date>
    <item>
      <title>need more teeth into .sh_history file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711450#M60657</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;How can I get Timestamp info into the .sh_history file?&lt;BR /&gt;&lt;BR /&gt;thanks</description>
      <pubDate>Thu, 25 Apr 2002 20:55:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711450#M60657</guid>
      <dc:creator>Jacob_2</dc:creator>
      <dc:date>2002-04-25T20:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: need more teeth into .sh_history file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711451#M60658</link>
      <description>Hi&lt;BR /&gt;Good question. The closest I have ever gotten was in the .profile add &lt;BR /&gt;date &amp;gt;&amp;gt; .sh_history&lt;BR /&gt;to the bottom line. &lt;BR /&gt;That will give you a time line per instance.Not per command.&lt;BR /&gt;&lt;BR /&gt;Richard</description>
      <pubDate>Thu, 25 Apr 2002 21:12:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711451#M60658</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2002-04-25T21:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: need more teeth into .sh_history file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711452#M60659</link>
      <description>Remember that messing with the sh_history file may hamper the ability to use 'history' commands like Esc-k, fc, r.&lt;BR /&gt;Also, each user ean edit his/her own sh_history file, so this may not be such a good place to look for adding more teeth.&lt;BR /&gt;If you really need tighter auditing, consider using BigBrother ( &lt;A href="http://bb4.com/" target="_blank"&gt;http://bb4.com/&lt;/A&gt; )</description>
      <pubDate>Fri, 26 Apr 2002 00:48:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711452#M60659</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2002-04-26T00:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: need more teeth into .sh_history file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711453#M60660</link>
      <description>you can have a history file for each user logged in i.e in the profile add&lt;BR /&gt;export HISTFILE=/tmp/.hist$$&lt;BR /&gt;&lt;BR /&gt;laters</description>
      <pubDate>Fri, 26 Apr 2002 10:25:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711453#M60660</guid>
      <dc:creator>Devbinder Singh Marway</dc:creator>
      <dc:date>2002-04-26T10:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: need more teeth into .sh_history file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711454#M60661</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Add the following to .profile:-&lt;BR /&gt;--------------------------------&lt;BR /&gt;# Date stamp (When logged in) &amp;gt;&amp;gt; .sh_history&lt;BR /&gt;# Who logged in (From where)                &lt;BR /&gt;        date &amp;gt;&amp;gt; ~/.sh_history               &lt;BR /&gt;        who -u|grep root &amp;gt;&amp;gt; ~/.sh_history   &lt;BR /&gt;&lt;BR /&gt;-------------------------------&lt;BR /&gt;Change the grep to suit the user.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Entry in .sh_history will look like :-&lt;BR /&gt;----------------------------------&lt;BR /&gt;Mon Mar 19 17:21:19 GMT 2001       &lt;BR /&gt;root pts/tDb Mar 19 17:21 . 1375  172.20.1.118 &lt;BR /&gt;cd etc                                 &lt;BR /&gt;cat passwd |grep avap          &lt;BR /&gt;exit                                           ----------------------------------- &lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Paula</description>
      <pubDate>Fri, 26 Apr 2002 10:49:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711454#M60661</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2002-04-26T10:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: need more teeth into .sh_history file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711455#M60662</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;What I needed is this &lt;BR /&gt;Entry in .sh_history should  look like :- &lt;BR /&gt;---------------------------------- &lt;BR /&gt; &lt;BR /&gt;Mar 19 17:21:19  $PS1  cd etc &lt;BR /&gt;Mar 19 17:30:19  $PS1  cat passwd |grep avap &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Apr 2002 15:36:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711455#M60662</guid>
      <dc:creator>Jacob_2</dc:creator>
      <dc:date>2002-04-26T15:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: need more teeth into .sh_history file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711456#M60663</link>
      <description>&lt;BR /&gt;To my knowlege, that can not be done by conventinal means.&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Apr 2002 15:42:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711456#M60663</guid>
      <dc:creator>hpuxrox</dc:creator>
      <dc:date>2002-04-26T15:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: need more teeth into .sh_history file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711457#M60664</link>
      <description>Hi Jacob:&lt;BR /&gt;&lt;BR /&gt;I think you need to enable accounting in your system inorder to do this. This will keep track of each command, time, user, processes etc. See this for more details:&lt;BR /&gt;&lt;BR /&gt;# man 1M acct&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Shiju</description>
      <pubDate>Fri, 26 Apr 2002 15:53:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711457#M60664</guid>
      <dc:creator>Helen French</dc:creator>
      <dc:date>2002-04-26T15:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: need more teeth into .sh_history file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711458#M60665</link>
      <description>a 'ugly' way to do this is to set a cronjob to run, say every 10 mins, just to insert time tag into .sh_history file:&lt;BR /&gt;date &amp;gt;&amp;gt; .sh_history&lt;BR /&gt;&lt;BR /&gt;then you can have a rough idea which command was issued at when -- change cronjob frequency with your demand.&lt;BR /&gt;&lt;BR /&gt;thanks,&lt;BR /&gt;Gary</description>
      <pubDate>Fri, 26 Apr 2002 18:45:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711458#M60665</guid>
      <dc:creator>Gary Yu</dc:creator>
      <dc:date>2002-04-26T18:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: need more teeth into .sh_history file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711459#M60666</link>
      <description>I don't think there is a way to do it with the standard shells.  You may be able to create a companion file with acctcom using the accounting info, but I would not try to merge them.</description>
      <pubDate>Mon, 29 Apr 2002 17:48:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711459#M60666</guid>
      <dc:creator>Ed Sampson</dc:creator>
      <dc:date>2002-04-29T17:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: need more teeth into .sh_history file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711460#M60667</link>
      <description>Have each user in each session maintain their own HISTory files:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;readonly HISTFILE="${HOME}/.sh_history_`date +%y%m%d.%H%M%S`.$$"&lt;BR /&gt;readonly HISTSIZE=50000&lt;BR /&gt;export HISTFILE HISTSIZE&lt;BR /&gt;&lt;BR /&gt;Of course you need to maintain them (DELETE them) after you have done what you wish to do with them.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Mon, 29 Apr 2002 18:13:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711460#M60667</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-04-29T18:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: need more teeth into .sh_history file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711461#M60668</link>
      <description>I would suggest using 'print -s' instead of '&amp;gt;&amp;gt;'.  For example, try this:&lt;BR /&gt;&lt;BR /&gt;print -s `/sbin/date`&lt;BR /&gt;print -s `/usr/bin/who -um`&lt;BR /&gt;&lt;BR /&gt;You can set these commands in users' .profile or in a script (to be executed by cron).&lt;BR /&gt;&lt;BR /&gt;The point is that the standard output re-direction may corrupt your command line history mechanism.&lt;BR /&gt;&lt;BR /&gt;If you want a timestamp on the same line with the command line, that may also corrupt your command line history mechanism.&lt;BR /&gt;&lt;BR /&gt;For more information on 'print -s' do 'man sh-posix'</description>
      <pubDate>Mon, 29 Apr 2002 18:58:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711461#M60668</guid>
      <dc:creator>Mladen Despic</dc:creator>
      <dc:date>2002-04-29T18:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: need more teeth into .sh_history file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711462#M60669</link>
      <description>Thanks all,&lt;BR /&gt;&lt;BR /&gt;I guess the only way would be turn on accounting.</description>
      <pubDate>Tue, 30 Apr 2002 14:28:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711462#M60669</guid>
      <dc:creator>Jacob_2</dc:creator>
      <dc:date>2002-04-30T14:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: need more teeth into .sh_history file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711463#M60670</link>
      <description>Hi Jacob,&lt;BR /&gt;&lt;BR /&gt;have you considered using "script"?&lt;BR /&gt;That way you can have the commmands AND their output in a logfile, and if you put the date&amp;amp;time into your prompt, you'll get what you asked for...&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Wodisch&lt;BR /&gt;</description>
      <pubDate>Tue, 30 Apr 2002 15:59:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711463#M60670</guid>
      <dc:creator>Wodisch</dc:creator>
      <dc:date>2002-04-30T15:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: need more teeth into .sh_history file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711464#M60671</link>
      <description>Hi Wodisch,&lt;BR /&gt;&lt;BR /&gt;I needed this to keep a track of user commands for any misbehaviour diagnosis or flaw detection..etc&lt;BR /&gt;&lt;BR /&gt;And the format I was looking for is as below....Timestamp..Command (no output) &amp;amp; paths.&lt;BR /&gt;&lt;BR /&gt;example.&lt;BR /&gt;&lt;BR /&gt;Mar 19 17:21:19 $PS1 cd etc &lt;BR /&gt;Mar 19 17:30:19 $PS1 cat passwd |grep avap &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Anyway , thanks for all the help.&lt;BR /&gt;As I said earlier I may have to look at accouting.&lt;BR /&gt;&lt;BR /&gt;Jacob</description>
      <pubDate>Tue, 30 Apr 2002 16:46:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711464#M60671</guid>
      <dc:creator>Jacob_2</dc:creator>
      <dc:date>2002-04-30T16:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: need more teeth into .sh_history file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711465#M60672</link>
      <description>Maybe you could try putting the script command in /etc/profile.&lt;BR /&gt;&lt;BR /&gt;script -a /audit/`id -un`.auditfile&lt;BR /&gt;&lt;BR /&gt;Im sure these will fill up fast. So be sure to set some kind of auto log cleanup.</description>
      <pubDate>Tue, 30 Apr 2002 16:57:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711465#M60672</guid>
      <dc:creator>hpuxrox</dc:creator>
      <dc:date>2002-04-30T16:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: need more teeth into .sh_history file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711466#M60673</link>
      <description>Jacob,&lt;BR /&gt;&lt;BR /&gt;How about adding the date command to their prompt?&lt;BR /&gt;As in:&lt;BR /&gt;export PS1="`date`(!)`whoami`# "&lt;BR /&gt;Put this in their .profile.  If need be you can lock down write access to their .profile so they can't mess with it.&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Tue, 30 Apr 2002 17:08:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711466#M60673</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2002-04-30T17:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: need more teeth into .sh_history file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711467#M60674</link>
      <description>ohhraa Pete! and then use the script command.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 30 Apr 2002 17:10:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711467#M60674</guid>
      <dc:creator>hpuxrox</dc:creator>
      <dc:date>2002-04-30T17:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: need more teeth into .sh_history file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711468#M60675</link>
      <description>Then if you wait to see it like a .sh_history&lt;BR /&gt;cat /audit/username.auditfile | grep "A_Key_Word_form_the_prompt"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 30 Apr 2002 17:13:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711468#M60675</guid>
      <dc:creator>hpuxrox</dc:creator>
      <dc:date>2002-04-30T17:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: need more teeth into .sh_history file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711469#M60676</link>
      <description>So brother Randall, is "ohhraa" a good thing?  I'll hope so.</description>
      <pubDate>Tue, 30 Apr 2002 17:16:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-more-teeth-into-sh-history-file/m-p/2711469#M60676</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2002-04-30T17:16:59Z</dc:date>
    </item>
  </channel>
</rss>

