55449b6f0a93b51dc5d79956b97ccbc0c7919be5
programming/nubbins.md
... | ... | @@ -21,5 +21,14 @@ find [top processes][] sorted by mem or cpu usage |
21 | 21 | ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head |
22 | 22 | ``` |
23 | 23 | |
24 | +## tmux ssh |
|
25 | +use tmux window name to ssh (.bashrc function example) |
|
26 | +``` |
|
27 | +ssh() { |
|
28 | + [ $# -eq 0 ] && \ |
|
29 | + /usr/bin/ssh $(tmux display-message -p '#W') || \ |
|
30 | + /usr/bin/ssh $* |
|
31 | +``` |
|
32 | + |
|
24 | 33 | [zombie processes]: https://www.howtogeek.com/119815/htg-explains-what-is-a-zombie-process-on-linux/ |
25 | 34 | [top processes]: https://tecmint.com/find-linux-processes-memory-ram-cpu-usage |