微信公众号:爱问CTO
专业编程问答社区
www.askcto.com
标准错误的重定向操作通常发生在标准输出重定向操作之后,例如,标准输出重定向到51mn.txt,然后2>&1把标准错误重定向到51mn.txt。
[root@ky35z 51mn]# ls -l /bin/usr/ > 51mn.txt 2>&1
如果将顺序改变,将会把标准错误重定向到屏幕上面。
[root@ky35z 51mn]# ls -l /bin/usr/ 2>&1> 51mn.txt
ls: cannot access /bin/usr/: No such file or directory
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。