在 Bash 中,我想将 stdout 重定向到一个文件 (>> mylog.txt),但还要在屏幕上看到 stdout 输出..
我怎样才能用 bash 做到这一点?
terminal bash shell redirection stdout
所以我回显了我在终端中运行的程序的输出 command 2>&1 >> /path/toFile.txt
command 2>&1 >> /path/toFile.txt
它创建了一些我想要克服的限制:
如何将输出回显到文件并能够:
a)查看该文件中的实时更改(我假设需要单独的程序)
或者
b) 输出到文件并同时在终端中查看该输出
linux terminal command-line
terminal ×2
bash ×1
command-line ×1
linux ×1
redirection ×1
shell ×1
stdout ×1