linux - stdout, stderr 总是可以发送到常规文件吗?

标签 linux bash shell

我可以在 Linux 上配置 bash 以将所有 stdout 和 stderr 的副本写入常规文件,而不必为每个命令指定重定向吗?

谢谢, 肯特

最佳答案

您可以使用 script创建 shell session 的日志

关于linux - stdout, stderr 总是可以发送到常规文件吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3382432/

相关文章:

bash - 如何在 Bash 的括号中使用 not (!)?

c++ - 如何制作不依赖于 .so 文件的可执行二进制文件

linux - 在 Linux 中编辑比屏幕宽的文件

bash - Bash 中的动态变量名称

bash - 将命令作为输入传递给另一个命令(su、ssh、sh 等)

linux - 使用命令的输出来喂另一个

bash - 如何在执行时回显 shell 命令

linux - 如何从使用 sudo 运行的程序访问用户的 ssh key ?

linux - 所有 Linux 发行版中的/proc/[pid]/stat 是否始终可用?

linux - KSH:限制一次可以运行的线程数