Apr 21, 2016 01:08 PM
(This post was last modified: Apr 21, 2016 01:09 PM by Tex..)
Unlike the others who frequently delete '.bash_history' or alter the environment so no history of executed commands, i prefer to increase its size and to show my exact date was given an comman. The reason is simply, look what I did on that server and I need to see exactly .
I added in '~/.bashrc' following lines:
So history shows default:
So look on a server with changed history:
I added in '~/.bashrc' following lines:
Code
export HISTTIMEFORMAT="%d/%m/%y %T "
export HISTFILESIZE=5000000
export HISTSIZE=5000000So history shows default:
Code
macbook ~$ history
1 cat Documents/provision
2 cat Documents/status
3 echo 540+876+7320+54|bc
4 pico Work/ARM/echip/usr/src/sys.c
5 pico Work/ARM/echip/usr/src/sys.c
6 ssh [email protected]
macbook ~$So look on a server with changed history:
Code
root@tex:~# history
......
329 21/04/16 21:39:18 tail -f /var/log/mail.log
330 21/04/16 21:39:18 cd /etc/amavis/
331 21/04/16 21:39:18 ls
332 21/04/16 21:39:18 cd conf.d/
333 21/04/16 21:39:18 ls
334 21/04/16 21:39:18 pico 01-debian
335 21/04/16 21:39:18 grep group *
336 21/04/16 21:39:18 pico 50-user
337 21/04/16 21:39:18 apt-get install libnet-dns-perl libmail-spf-query-perl pyzor razor
338 21/04/16 21:39:18 apt-get install arj
339 21/04/16 21:39:18 apt-get install unarj
......
