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?

  • 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

Bash redirect:

program > stdout_log 2> stderr_log

If you want to append instead of overwriting:

program >> stdout_log 2>>stderr_log

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.