在 Ubuntu 终端中使用 Screen 时将程序的输出和错误保存在文本文件中

Saving outputs and errors of a program in text files while using Screen in Ubuntu terminal

如何在 Ubuntu 终端中的文本文件中保存 Screen 应用程序处理的后台终端中程序 运行 的错误和输出?

我使用了以下结构,但它没有在文本文件中保存任何内容:

Screen -m -d <command here>  &>errorOut.txt >output.txt

screen 附带一个内置选项,可将所有 bash 输出保存到日志文件中。
尝试 运行 screen-L

screen -L -m -d <command here> 

这会将输出保存到格式为 screenlog.x 的单独文件中 其中 x 是一个数字。