strace likes to trim messages, for example:

sendto(4, "\4\356\1\0\0\1\0\0\0\0\0\0\4[more content]"..., 44, MSG_NOSIGNAL, NULL, 0) = 44

Can I tell strace to print N bytes (or even all bytes) rather than trimming at some predefined point? The man page is the size of a small novel, and searching for "trim", "shorten" etc. yielded nothing.

1 Answer 1


Searching for "bytes" did it: -s strsize controls the number of bytes printed. Unfortunately there doesn't seem to be any way to print everything - -s 0 prints an empty string, and -s -1 is considered an invalid argument.

  • 1
    Strace limits the string size limit to -1U/4, which on most systems is a little over 1 billion. Jul 28, 2019 at 23:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .