【原创】Linux基础之重定向stdout/stderr


启动进程后查看日志(stdout和stderr)

1 nohup+tail

# nohup $cmd > /path/to/file 2>&1 &
# tail -f /path/to/file

append
# nohup $cmd >> /path/to/file 2>&1 &

 

2 tee

# $cmd|& tee /path/to/file

append
# $cmd|& tee -a /path/to/file

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM