读书人

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

发布时间: 2012-06-01 16:46:36 作者: rapoo

重定向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

读书人网 >UNIXLINUX

热点推荐