心灵鸡汤是给吃惯了鲍参翅肚的人做的换口味小菜,屌丝以为喝一碗鸡汤就营养全面提升了?

log for linux bash command

Unless a command has output or logging already configured, rc.local commands will not log anywhere.

If you want to see logs for specific commands, try redirecting the stdout and stderr for rc.localto somewhere you can check. Try adding this to the top of your /etc/rc.local file.


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

Though this will require to rerun the rc.local file.

标签bash debug log

最新评论