ls aaa >output.txt 2>&1
ls aaa 2&>1 output.txt。仔细看&和>的顺序。
少年, 你应该这样写#ls aaa &>output.txt
亲 他都提示了 没有aaa目录或者文件 你ls内容都没有 怎么成功?