注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。
启动新会话:
tmux [new -s 会话名 -n 窗口名]
恢复会话:
It has been a long time since I finish(nearly) these problems...
In linux, 0 is std_input, 1 is std_output, 2 is std_error_output.
We just need to send LETMEWIN to std_input and set fd to 0 which means (our input - 0x1234) == 0.
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <sys/types.h> | |
| #include <sys/socket.h> | |
| #include <netinet/in.h> | |
| #define SERVER_PORT 9999 | |
| / * CC-BY: Osanda Malith Jayathissa (@OsandaMalith) | |
| * Bind Shell using Fork for my TP-Link mr3020 router running busybox |
| #!/bin/bash | |
| # where to store the sparse-image | |
| WORKSPACE=~/Documents/workspace.dmg.sparseimage | |
| create() { | |
| hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 60g -volname workspace ${WORKSPACE} | |
| } | |
| detach() { |