无法将命令输出重定向到文件(对于后缀状态)

Chr*_*ris 3 linux bash shell

我试图运行以下命令:

postfix status > tmp
Run Code Online (Sandbox Code Playgroud)

但是,生成的文件永远不会写入任何内容,而输出仍然会发送到终端.

我已经尝试将以下内容添加到混合中,甚至在重定向输出之前使用echo来回显,但似乎没有任何效果

postfix status 2>&1 > tmp
Run Code Online (Sandbox Code Playgroud)

其他命令没有问题.

小智 5

script -c 'postfix status' -q tmp
Run Code Online (Sandbox Code Playgroud)