Tag Archives: bashrc

How to log bash history with syslog

There are two methods to get this thing done. 1. Trap method – drop the following snippet into either the per-user or system-wide bash profile (~/.bash_profile or /etc/profile, respectively) unset HISTSIZE HISTFILESIZE export HISTTIMEFORMAT=’%F %T’ function log2syslog{    declare COMMAND    COMMAND=$(fc -ln -0)    logger -p local1.notice -t bash -i — “${USER}:${COMMAND}”}trap log2syslog DEBUG … Continue reading How to log bash history with syslog

Fixing the annoying “perl: warning: Setting locale failed” error message

 This is what I get: [codesyntax lang=”bash”] perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = “en_US.utf8” are supported and installed on your system. perl: warning: Falling back to the standard locale (“C”). [/codesyntax]  This is how I fix it: [codesyntax lang=”bash”] export … Continue reading Fixing the annoying “perl: warning: Setting locale failed” error message