输出、输入 、重定向

一、输出重定向

只输出错误的,正确的不输出

command 1> /dev/null   ==   command  > /dev/null

只输出正确的,错误的不输出

command 2> /dev/null

正确的和错误的都不输出

command > /dev/null 2>&1

注意: 1>  1和大于号是紧挨着的


参照文档:https://www.cnblogs.com/520playboy/p/6275022.htm

原文地址:https://www.cnblogs.com/effortsing/p/10001953.html