Redirecting output from a known file descriptors to a file is as simple as
./binary 1> ./file 2>&1
But, let's say I have a binary which might be using file descriptors other than
2 default to current
tty if the commands are run interactively
I'm running the binary interactively, but I think the binary has other file descriptors pointing to current
tty because I have already redirected
2 file descriptors to a file, but still some output is being written to terminal, not in the file.
It might be using
n number of other file descriptors, but I don't know which ones it's using.
I just want to redirect all these file descriptors which are pointing to current
tty to a file.
I don't care which file descriptor the binary is writing to, all streams should be redirected to this file
Something sort of like
./binary *> ./file