Quantcast
Channel: Bash – 2Axels-Company
Viewing all articles
Browse latest Browse all 12

Timestamp in Bash-History

$
0
0

Ein kleines und nettes Feature ist es z.B. in der Bash-History einen Timestamp zu setzen. Eventuell kann man bei dieser Gelegenheit noch die History-Size etwas hochsetzen.

.bash_rc oder .profile

# Set the Timestamp for the .bash_history
export HISTCONTROL=erasedups
export HISTTIMEFORMAT="%F %T: "
export HISTSIZE=1000
shopt -s histappend


abirndt@2axels-company.de:~$ history

474 2012-04-04 19:58:16: history
475 2012-04-04 22:41:05: cd /var/log/apache2/
476 2012-04-04 22:41:06: ls
477 2012-04-04 22:41:17: tail -f piwik.2axels-company.de_access.log
478 2012-04-05 21:36:14: cd malte/.upload_pictures_gallery/
479 2012-04-05 21:36:14: ls -la
480 2012-04-05 21:36:14: rm DSCF50*
481 2012-04-05 21:36:14: ls -l
482 2012-04-05 21:36:14: mysql -v
483 2012-04-05 21:36:14: mysql -help
484 2012-04-05 21:36:14: mysql --help

Tipp: http://wordpress.org/extend/plugins/wp-syntax/other_notes/


Viewing all articles
Browse latest Browse all 12