【问题标题】:strace tmux output redirected to a filestrace tmux 输出重定向到文件
【发布时间】:2012-09-12 12:41:28
【问题描述】:

我想检查 tmux 在启动时接触了哪些文件(不仅仅是 tmux 运行时打开的文件列表)。 Strace tmux 似乎是最好的选择。

尝试将输出重定向到文件strace tmux > /tmp/blah 时。文件为空。

为什么会这样? 如何将跟踪重定向到文件?

【问题讨论】:

    标签: io-redirection strace


    【解决方案1】:

    哦,我明白了。 Strace 不打印到标准输出。它打印到标准错误。

    strace tmux 2> /tmp/blah 有效。

    【讨论】:

      【解决方案2】:

      您还可以将-o 选项与strace 一起使用,它将跟踪输出写入文件而不是stderr

      strace -o /tmp/blah tmux

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2016-08-09
        • 2013-10-11
        • 2016-11-27
        • 2023-03-19
        • 2020-08-03
        • 2014-03-31
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多