在控制台中运行没有输出的命令

有时我需要在控制台中运行dolphin来查看GUI中的当前目录(因为我已经实现了一些function)。

所以我尝试做(dolphin > /dev/null) &为了不要有很多的输出,但我得到的消息,如QPixmap::scaled: Pixmap is a null pixmap即使做> /dev/null在控制台中QPixmap::scaled: Pixmap is a null pixmap

那么为了不显示输出,我的命令有什么问题?

您需要将标准错误和标准错误redirect到/ dev / null。

尝试以下。

 ( dolphin > /dev/null 2>&1 )&