2017-08-18 51 views

回答

0

tmux选项-S意味着套接字路径(从man tmux):

-S socket-path 
       Specify a full alternative path to the server socket. If -S is specified, the default 
       socket directory is not used and any -L flag is ignored. 

所以,你必须找出tmux-S选项运行父目录,并通过此选项tmux把它指向 备用套接字路径。例如,你可以找到 tmux过程PID

$ ps aux | grep '[t]mux' 
ja  15121 0.0 0.0 20252 2236 pts/6 S+ 00:44 0:00 tmux -S new 

然后在/proc像这样的检查这个过程cwd

$ ls -l /proc/15121/cwd 
lrwxrwxrwx 1 ja users 0 Aug 19 00:52 /proc/15121/cwd -> /home/ja 

然后参考该tmux会议:

$ tmux -S /home/ja/new ls 
0: 1 windows (created Sat Aug 19 00:44:46 2017) [212x65] (attached)