1
我創建了一個新的tmux會話,打算使用-s標誌來命名它,但將命令與-S指定了一個套接字。我知道會話還活着,因爲我開始的過程仍在運行。但是,當我嘗試列出正在運行的會話時,它不會顯示。我的會議在哪裏,我如何恢復?意外使用-S創建我的tmux會話時,而不是-s,我的會話在哪裏?
我創建了一個新的tmux會話,打算使用-s標誌來命名它,但將命令與-S指定了一個套接字。我知道會話還活着,因爲我開始的過程仍在運行。但是,當我嘗試列出正在運行的會話時,它不會顯示。我的會議在哪裏,我如何恢復?意外使用-S創建我的tmux會話時,而不是-s,我的會話在哪裏?
在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)