I want to check which files does tmux touch when it is launched (not just the list of open files when tmux is running). Strace tmux seemed like the best option.
When trying to redirect the output to a file strace tmux > /tmp/blah
. File is empty.
Why does this happen? How to redirect the trace to a file?
You can also use the -o
option with strace
which writes the trace output to the file rather than to stderr
.
strace -o /tmp/blah tmux
Oh I got it. Strace doesn't print to stdout. It prints to stderr.
strace tmux 2> /tmp/blah
works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With