0

I have a process that is causing a reboot. I'd like to capture any console messages to the messages are not lost. How can I do that?

dthacker
  • 157
  • The kernel messages from a kernel panic should still appear in /var/log/messages after a reboot. It maybe just that the messages are in an older message file after log rotation. – Raman Sailopal Oct 18 '17 at 15:22

1 Answers1

2

Bash redirect:

program > stdout_log 2> stderr_log

If you want to append instead of overwriting:

program >> stdout_log 2>>stderr_log