add the old snippet md files

This commit is contained in:
Travis Shears 2025-06-05 16:20:57 +02:00
parent fc0dd204c7
commit bcf8313a4b
110 changed files with 3048 additions and 0 deletions

View file

@ -0,0 +1,27 @@
---
title: "tmux plus screen"
date: 2020-08-17T14:19:16+02:00
draft: false
snippet_types:
- screen
- tmux
---
Recently I was sshed into my home pi server trying to sftp some big files from a remote server.
Some of the transfers are huge, 30gb+. On our internet that will take a while. Not
wanting to leave the shh terminal session open that whole time I used
[screen](https://linux.die.net/man/1/screen) on the pi.
Idea was to create a screen session start the transfer detach and comeback few hours later.
Detaching was a bit tricky. <Ctrl\><a\> <d\> is the default detach command for both tmux running on my
mac and screen running on the pi. So when I tried to detach from the screen session tmux would
detach instead. 😡
After messing with configs and some searching turns out if you press the tmux prefix key twice it
sends it once to the child shell. So eventually I was able to detach from the screen session with:
**<Ctrl\><a\> <Ctrl\><a\> <d\>**!!
sources:
- [stackoverflow](https://stackoverflow.com/questions/8518815/how-to-send-commands-when-opening-a-tmux-session-inside-another-tmux-session)
- [screen basics](https://www.howtogeek.com/662422/how-to-use-linuxs-screen-command)