首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > UNIXLINUX >

重定向stdout stderr到文件,文件为空,该如何处理

2012-06-01 
重定向stdout stderr到文件,文件为空ulimit -c unlimited./xxxx &./xxxx run.log 2&1会是什么原因[解决

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

热点排行