aelius Posted April 3, 2014 Report Share Posted April 3, 2014 Spre diferenta de altii care sterg frecvent '.bash_history' sau altereaza environmentul astfel incat sa nu existe un istoric al comenzilor executate, eu prefer sa maresc dimensiunea acestuia si sa imi afiseze data exacta la care a fost data o comanda. Motivul este simplu, mai uit ce am facut pe acel server si am nevoie sa vad exact.Am adaugat in '~/.bashrc' urmatoarele linii:export HISTTIMEFORMAT="%d/%m/%y %T "export HISTFILESIZE=5000000export HISTSIZE=5000000Cam asa arata history default: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 root@ns.xxx.orgmacbook ~$ Asa arata pe un server cu history modificat:root@pluto:~# history...... 329 03/04/14 21:39:18 tail -f /var/log/mail.log 330 03/04/14 21:39:18 cd /etc/amavis/ 331 03/04/14 21:39:18 ls 332 03/04/14 21:39:18 cd conf.d/ 333 03/04/14 21:39:18 ls 334 03/04/14 21:39:18 pico 01-debian 335 03/04/14 21:39:18 grep group * 336 03/04/14 21:39:18 pico 50-user 337 03/04/14 21:39:18 apt-get install libnet-dns-perl libmail-spf-query-perl pyzor razor 338 03/04/14 21:39:18 apt-get install arj 339 03/04/14 21:39:18 apt-get install unarj...... Quote Link to comment Share on other sites More sharing options...
Silviu Posted April 3, 2014 Report Share Posted April 3, 2014 Foarte interesant mo?ule! M? bucur c? mai dai ?i tu din cas?! P.S: Poate repui rtfm-ul pe picioare! 1 Quote Link to comment Share on other sites More sharing options...