{"id":110,"date":"2023-11-22T23:07:43","date_gmt":"2023-11-22T23:07:43","guid":{"rendered":"http:\/\/10.1.250.135\/ozus\/?page_id=110"},"modified":"2023-11-23T16:05:06","modified_gmt":"2023-11-23T16:05:06","slug":"ksh-aix-extended-shell-history-setup","status":"publish","type":"page","link":"https:\/\/ozus.com\/index.php\/ksh-aix-extended-shell-history-setup\/","title":{"rendered":"KSH: (AIX) Extended Shell History Setup"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Create a directory called<br>mkdir \/var\/History<br>chmod 1733 \/var\/History<\/p>\n\n\n\n<p>Create a directory called<br \/><span style=\"color: blue;\">mkdir \/var\/History<\/span><br \/><span style=\"color: blue;\">chmod 1733 \/var\/History<\/span><\/p>\n<p><span style=\"color: blue;\">vi \/etc\/profile<\/span><br \/>Add the following<br \/><span style=\"color: red;\"><br \/>################################################################<br \/>############### Changes only with <span style=\"color: blue;\">Your Company Name Here<\/span> Approval ###############<br \/>################################################################<br \/>if [ -t 0 -a &#8220;${SHELL}&#8221; != &#8220;\/bin\/bsh&#8221; ]<br \/>then<br \/>HN=`hostname`<br \/>DATE=`date &#8220;+%Y%m%d_%H:%M:%S&#8221;`<br \/>WHO=`who -m | awk &#8216;{print $NF}&#8217; | sed &#8220;s\/(\/\/g&#8221; | sed &#8220;s\/)\/\/g&#8221;`<br \/>BASEWHO=`who am i | awk &#8216;{print $1}&#8217; 2&gt;\/dev\/null`<br \/>PTS=`tty | cut -c6- | sed &#8220;s\/\/\/-\/g&#8221;`<br \/>typeset -r HISTFILE=\/var\/History\/${HN}-${LOGIN}_sh_history-${DATE}-${LOGIN}-${BASEWHO}-${WHO}-${PTS}<br \/>fi<br \/>unset HISTCONTROL<br \/>unset HISTIGNORE<br \/>typeset -r HISTSIZE=10000<br \/>EXTENDED_HISTORY=ON<br \/>HISTTIMEFORMAT=&#8221;%F %T &#8220;<br \/>typeset -r HISTCONTROL<br \/>typeset -r HISTIGNORE<br \/>export HISTFILE HISTSIZE EXTENDED_HISTORY HISTTIMEFORMAT HISTCONTROL HISTIGNORE<br \/>################################################################<br \/><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Create a directory calledmkdir \/var\/Historychmod 1733 \/var\/History Create a directory calledmkdir \/var\/Historychmod 1733 \/var\/History vi \/etc\/profileAdd the following############################################################################### Changes only with Your Company Name Here Approval ###############################################################################if [ -t 0 -a &#8220;${SHELL}&#8221; != &#8220;\/bin\/bsh&#8221; ]thenHN=`hostname`DATE=`date &#8220;+%Y%m%d_%H:%M:%S&#8221;`WHO=`who -m | awk &#8216;{print $NF}&#8217; | sed &#8220;s\/(\/\/g&#8221; | sed &#8220;s\/)\/\/g&#8221;`BASEWHO=`who am i | awk &#8216;{print $1}&#8217; 2&gt;\/dev\/null`PTS=`tty | &#8230; <a title=\"KSH: (AIX) Extended Shell History Setup\" class=\"read-more\" href=\"https:\/\/ozus.com\/index.php\/ksh-aix-extended-shell-history-setup\/\" aria-label=\"Read more about KSH: (AIX) Extended Shell History Setup\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-110","page","type-page","status-publish"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/ozus.com\/index.php\/wp-json\/wp\/v2\/pages\/110","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ozus.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ozus.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ozus.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ozus.com\/index.php\/wp-json\/wp\/v2\/comments?post=110"}],"version-history":[{"count":1,"href":"https:\/\/ozus.com\/index.php\/wp-json\/wp\/v2\/pages\/110\/revisions"}],"predecessor-version":[{"id":111,"href":"https:\/\/ozus.com\/index.php\/wp-json\/wp\/v2\/pages\/110\/revisions\/111"}],"wp:attachment":[{"href":"https:\/\/ozus.com\/index.php\/wp-json\/wp\/v2\/media?parent=110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}