Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

strace tmux output redirected to a file

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?

like image 897
Swair Avatar asked Sep 20 '12 07:09

Swair


2 Answers

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

like image 108
manav m-n Avatar answered Nov 16 '22 18:11

manav m-n


Oh I got it. Strace doesn't print to stdout. It prints to stderr.

strace tmux 2> /tmp/blah works.

like image 43
Swair Avatar answered Nov 16 '22 19:11

Swair