Wednesday, March 29, 2017

tmux and screen

tmux:
https://tmux.github.io/

Very good tutorial
http://www.howardism.org/Technical/Linux/tmux.html

tmux list-sessions
tmux new -s buildQualcomm
tmux kill-session -t buildQualcomm
tmux list-session
tmux attach -t test123

http://unix.stackexchange.com/questions/5832/is-there-an-equivalent-of-gnu-screens-log-command-in-tmux


screen:
multiplex multiplex a physical console among multiple process
https://www.gnu.org/software/screen/

You could start screen with the -L option. This will cause screen to create a file screenlog.n (the n part is numerical, starting with a zero) in the current working directory.

Example: screen -S session_name -L -X <a_command>

For last line of the log, it can easily be obtained with tail -1 screenlog.0, or the entire log can be parsed however you wish.

One more nuance that may be helpful in the future: If you're in a screen session, you can interactively ask for the log file to be created. Press ctrl-a H (Control-A followed by capital H) to ask screen to start dumping whatever window you're in to a log file.


No comments:

Post a Comment