在shell中往往我们需要对输出和错误进行重定向,主要命令如下: command > out 2 > err //输出定向到out 错误定向到err command >& out //输出和错误都定向到out