My FreeBSD Server is totally terminal ... no monitor or keyboard. Is there any way to have all console messages output to the terminal I am logged into?
[FreeBSD][root][~]: touch /var/log/console.log && chmod 600 /var/log/console.log
[FreeBSD][root][~]: nano console
#!/usr/local/bin/bash
. /usr/src/include/lockfile.sh
fn=/var/log/$0.log
while [ 0 ]
do
if [ $(wc -c <"$fn") -ne 0 ]; then
cat $fn && truncate -s 0 $fn
fi
sleep 1
done
[FreeBSD][root][~]: chmod 744 console
[FreeBSD][root][~]: ./console &
tail -f /var/log/messages
? Use something like sysutils/screen or sysutils/tmux if you want to keep it running.Thank you, SirDice. No, I didn't know, but I do now. That is more convenient than what I was doing. Certainly by far.You do realize you can simply dotail -f /var/log/messages
? Use something like sysutils/screen or sysutils/tmux if you want to keep it running.
It does me too, but I'm keeping one terminal window reserved just for server messages.Personally it utterly annoys me if stuff prints on the terminal while I'm working on it.