廣告

2015年7月24日 星期五

[linux] how to get log of rc.local


add below script to your /etc/rc.local

exec 2> /tmp/rc.local.log  # send stderr from rc.local to a log file
exec 1>&2                  # send stdout to the same log file
set -x                     # tell sh to display commands before execution


沒有留言:

張貼留言