日期:2014-05-16  浏览次数:20711 次

重定向stdout stderr到文件,文件为空

ulimit -c unlimited
./xxxx &


./xxxx > run.log 2>&1


会是什么原因

------解决方案--------------------
试了下应该会有的
[root@RHEL6A scripts]# ./s5.sh > run.log 2>&1
[root@RHEL6A scripts]# more run.log 
ok
./s5.sh: line 2: abc: command not found
不会是你的脚本执行后本来就没输出?
ls -lrt /var/log/
看看最近修改的几个系统日志有没有什么相关提示信息在里面
------解决方案--------------------
#!/bin/bash