Add following in .zshrc
preexec() {
echo "[$(date +%d/%m/%Y-%H:%M:%S)] $(echo $SSH_CLIENT | awk '{ print $1}') - $1" >> /var/log/command.log
}
Add following in .zshrc
preexec() {
echo "[$(date +%d/%m/%Y-%H:%M:%S)] $(echo $SSH_CLIENT | awk '{ print $1}') - $1" >> /var/log/command.log
}
Similar can be achieved with
trap ____ debug
on.bashrc