linux 日志写入到指定文件中

php  /data/xxx/aaa.php > test.log 2>&1

>覆盖,

>>追加


2>&1 表示不仅命令行正常的输出保存到test.log中,产生错误信息的输出也保存到test.log文件中;

转载于:https://www.cnblogs.com/guoshuai-yangxu/p/11542822.html