首页 > 系统 > Linux > 正文

linux shell重定向

2020-05-27 13:12:41
字体:
来源:转载
供稿:网友

   将shell的错误输出重定向到标准输出,这样就可以记录脚本的出错信息。

  如:

  /root/test.sh >> test.log 2>&1

  注:

  linux先加载 /etc/rc.d/rc.local 后加载 /etc/profile

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表