...
If you accidentally close your terminal (e.g. putty, iterm2, etc) while the script is running in a detached session, you can reattach using the following commands:
For screen
users:
List active
screen
session:Code Block screen -ls
Reattach to the session:
Code Block screen -r <session_name>
For tmux
users:
List active
tmux
sessions:Code Block tmux ls
Reattach to the session:
Code Block tmux a -t <session_name>
...