注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。
启动新会话:
tmux [new -s 会话名 -n 窗口名]
恢复会话:
#!/bin/bash | |
# Configration | |
MYSQL=/usr/bin/mysql | |
TPCCLOAD=./tpcc_load | |
TABLESQL=./create_table.sql | |
CONSTRAINTSQL=./add_fkey_idx.sql | |
DEGREE=`getconf _NPROCESSORS_ONLN` |
#!/usr/bin/env python | |
""" | |
How to use it: | |
1. Just `kill -2 PROCESS_ID` or `kill -15 PROCESS_ID` , The Tornado Web Server Will shutdown after process all the request. | |
2. When you run it behind Nginx, it can graceful reboot your production server. | |
3. Nice Print in http://weibo.com/1682780325/zgkb7g8k7 | |
""" |
#!/bin/bash | |
set -euo pipefail | |
function myFunction() { | |
myCommand | |
return $? | |
} | |
retry=0 | |
maxRetries=5 |
#!/bin/bash | |
# ssh-multi | |
# D.Kovalov | |
# Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html | |
# a script to ssh multiple servers over multiple tmux panes | |
starttmux() { | |
if [ -z "$HOSTS" ]; then |
There's a couple of ways, one way is
SPC /
and type in your search stringSPC x S
and search string - where x is your scope indicator (p for project, d for directory, etc..)C-c C-e
inside the helm buffer to put all your match occurences and puts them into a special buffer called the edit buffer or something like thatC-c C-c
to commit your changes.#!/usr/bin/env python | |
""" | |
How to use it: | |
1. Just `kill -2 PROCESS_ID` or `kill -15 PROCESS_ID`, | |
The Tornado Web Server Will shutdown after process all the request. | |
2. When you run it behind Nginx, it can graceful reboot your production server. | |
""" | |
import time |
#!/bin/bash | |
#### | |
# Upload one file to configured S3 bucket | |
# | |
# 20240418 gbh | |
# | |
# Accepts the path to the file to upload as its only command-line argument. Uploads | |
# to the S3 bucket configured in the 'Configuration' block below. | |
# |