I have a Debian server with multiple tmux sessions running. Some of these sessions are idle and not running any active processes. How can I identify and terminate all tmux sessions that are not currently running any processes or commands? Additionally, what command can I use to kill all of these idle sessions at once? Detailed steps or commands would be greatly appreciated.
tail -f /dev/null
idle? Or is only a session where in each pane the main process is dead idle? (remain-on-exit on
). How about a pane with the main process dead, but where (grand)children still use their controlling terminal provided by the pane?