I am trying to get a list of tmux sockets that are currently being used but the best solution I've come up with so far is to check in /tmp/tmux* or TMPDIR.
As far as I can tell tmux keeps these sockets around for some amount of time even if no current tmux session is using them.
As such I was hoping there was something similar to tmux list-sessions, but for sockets, that would give me all the sockets that are currently being used. I couldn't seem to find one in the man page and if there was one I didn't properly understand that listing sockets was its purpose.
Thanks!
To list all sockets used by tmux
you can use lsof
:
lsof -U | grep '^tmux'
Use sudo
if the inquirer doesn't own the process.
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