<?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: bash history line in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/bash-history-line/m-p/4432968#M36858</link>
    <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;First see that history is being collected.&lt;BR /&gt;&lt;BR /&gt;echo $HISTFILE&lt;BR /&gt;&lt;BR /&gt;After you see there is a history you can grep it or cat it or less it or tail it to get the output you want&lt;BR /&gt;&lt;BR /&gt;cp $HISTFILE newfile&lt;BR /&gt;&lt;BR /&gt;Done, editable output.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
    <pubDate>Thu, 04 Jun 2009 08:50:32 GMT</pubDate>
    <dc:creator>Steven E. Protter</dc:creator>
    <dc:date>2009-06-04T08:50:32Z</dc:date>
    <item>
      <title>bash history line</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bash-history-line/m-p/4432967#M36857</link>
      <description>&lt;!--!*#--&gt;hey i'm new to ll of unix and i'm kinda in a pickle atm... i need to make a program and asap so that i can see the command line history of a user on a terminal and no i cannot use the "history" command, need it to be in editing mode, it needs to be a program in bash :/&lt;BR /&gt;&lt;BR /&gt;if anyone can help me out i'd really appreciated. thank you very much</description>
      <pubDate>Thu, 04 Jun 2009 08:45:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bash-history-line/m-p/4432967#M36857</guid>
      <dc:creator>TeaM17cr</dc:creator>
      <dc:date>2009-06-04T08:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: bash history line</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bash-history-line/m-p/4432968#M36858</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;First see that history is being collected.&lt;BR /&gt;&lt;BR /&gt;echo $HISTFILE&lt;BR /&gt;&lt;BR /&gt;After you see there is a history you can grep it or cat it or less it or tail it to get the output you want&lt;BR /&gt;&lt;BR /&gt;cp $HISTFILE newfile&lt;BR /&gt;&lt;BR /&gt;Done, editable output.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Thu, 04 Jun 2009 08:50:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bash-history-line/m-p/4432968#M36858</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2009-06-04T08:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: bash history line</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bash-history-line/m-p/4432969#M36859</link>
      <description>&lt;!--!*#--&gt;thx, but that's not what i need.. i need to make a program in bash that prints out the commands used by a user with the posibility of chosing the period in wich the command was typed. :( i don't need just 1 command. it has to be a program</description>
      <pubDate>Thu, 04 Jun 2009 08:55:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bash-history-line/m-p/4432969#M36859</guid>
      <dc:creator>TeaM17cr</dc:creator>
      <dc:date>2009-06-04T08:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: bash history line</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bash-history-line/m-p/4432970#M36860</link>
      <description>The history file does not contain dates or anything that would indicate which time the user did this command. If you wish to do this i'd suggest looking for some kind of auditing tool that would do this for you.&lt;BR /&gt;&lt;BR /&gt;Linux normally doesn't log what commands are run except for the history file (which afaik does not support this action)&lt;BR /&gt;&lt;BR /&gt;What you could do thou is copy out the history file for that user every day. But to make sure you get just that current days history you'd have to clear the history file every time you copy it.&lt;BR /&gt;&lt;BR /&gt;This would be a bother for the users since the histfile is what makes it possible to use up-arrow.&lt;BR /&gt;&lt;BR /&gt;There probably are methods of doing this but if you have alot of history files then this could be damaging to performance.&lt;BR /&gt;&lt;BR /&gt;Just of the top of my head I would say a cronjob that runs every minute that reads all the history files for new entries (this is a bit tricky thou) and either fixes a date via 'date' command or insert into a database with a timestamp column.&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;BR /&gt;Fredrik Eriksson</description>
      <pubDate>Thu, 04 Jun 2009 11:37:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bash-history-line/m-p/4432970#M36860</guid>
      <dc:creator>Fredrik.eriksson</dc:creator>
      <dc:date>2009-06-04T11:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: bash history line</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bash-history-line/m-p/4432971#M36861</link>
      <description>HISTTIMEFORMAT="%D %T "&lt;BR /&gt;gets you timestamps into $HISTFILE.&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Jun 2009 12:32:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bash-history-line/m-p/4432971#M36861</guid>
      <dc:creator>H.Becker</dc:creator>
      <dc:date>2009-06-04T12:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: bash history line</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bash-history-line/m-p/4432972#M36862</link>
      <description>Apperantly I stand corrected. Didn't know about that :)&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;BR /&gt;Fredrik Eriksson&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Jun 2009 13:00:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bash-history-line/m-p/4432972#M36862</guid>
      <dc:creator>Fredrik.eriksson</dc:creator>
      <dc:date>2009-06-04T13:00:50Z</dc:date>
    </item>
  </channel>
</rss>

