Keeping Command History File in Oracle Solaris 11

Today I just figured it out that there's no history of commands being kept by the system.  I tried investigating and I found a forum that does the trick.  Unfortunately, I am unable to bookmark it, but credit is to the guy who make this thing to work.

root@lyon:~# grep -i hist .profile
root@lyon:~# grep -i hist /etc/profile
root@lyon:~# echo $SHELL
root@lyon:~# HISTFILE=$HOME/.bash_history.$$
root@lyon:~# export HISTFILE
root@lyon:~# HISTSIZE=10000
root@lyon:~# export HISTSIZE
root@lyon:~# history
   1 clear
   2 history
   3 grep -i hist .profile
   4 grep -i hist /etc/profile
   5 echo $SHELL
   6 HISTFILE=$HOME/.bash_history.$$
   7 export HISTFILE
   8 HISTSIZE=10000
   9 export HISTSIZE
   10 clear
   11 history
   12 clear
   13 pkg update
   14 pkg publisher
   15 clear
   16 pkg publisher
   17 mkdir -m 0755 -p /var/pkg/ssl
   18 pkg list -n solaris-11-cpu
   19 uname -a
   20 clear
   21 pkg info kernel
   22 pkg info entire
   23 cat /etc/resolv.conf
   24 vim /etc/resolv.conf
   25 svcadm refresh dns/client
   26 svcadm restart dns/client
   27 nslookup mondragon.dk
   28 nslookup cognomics.me
   29 nscfg export svc:/network/dns/client:default
   30 svcadm enable network/dns/client
   31 svcadm enable system/name-service/switch
   32 cat /etc/resolv.conf
   33 svcadm refresh dns/client && svcadm restart dns/client
   34 clear
   35 history

No comments:

Post a Comment