How to control processes efficiently?
- *Unix: utilize este comando:
- *Unix: you can do this command:
| screen -LdmS session_name command |
|---|
| screen -LdmS m_vi man vi |
-d iniciar em segundo plano
-m ignorar as variáveis de ambiente $STY
-S especificar o nome da sessão
-L to turn on automatic output logging for the windows (file: screenlog.0)
-d to start in "detached" mode
-m to ignore the $STY environment variable
-S to specify a meaningful name for the session
Listar os nomes das sessões:
Print a list of strings identifying your sessions:
| screen -ls |
|---|
*the session listed have pid plus session name
**pid = process ID (numeric)
Limpar as sessões mortas:
To clean the killed session:
| screen -wipe |
|---|
*you can do kill -9 pid and then screen -wipe
Recuperar uma sessão:
To resume a detached screen session:
| screen -r session_name |
|---|
Enviar para segundo plano a sessão recuperada:
To detach the session from the terminal:
| ctrl+a d |
|---|
Nenhum comentário:
Postar um comentário