I'm running a long command that produces a huge amount of debug output over several days. I'd like to be able to peek into this output and filter it on the fly since my interests vary—sometimes I'm looking for lines with 'foo,' other times 'bar,' etc. Since it's too much data to redirect to a single file and tail it for specific strings, I'm hoping for a solution that lets me tap into the command's output at any point.
Is there a way to broadcast this output and simultaneously filter out the lines I don't need, perhaps using netcat or similar tools? I'm not very familiar with the netcat family of commands, so I could use some guidance on how to set this up.
1 Answer
If you're already using tmux, you can detach from your session and then reattach when you want to check the output. There’s also a way to pipe the output to filters when you're inside tmux. Give it a try!
I didn’t know tmux could do that! I’ll definitely look into how to filter while inside a session. Thanks!