LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   How to log command output from telnet session even after logout from the remote serve (https://www.linuxquestions.org/questions/solaris-opensolaris-20/how-to-log-command-output-from-telnet-session-even-after-logout-from-the-remote-serve-492591/)

UltraSoul 10-15-2006 10:38 AM

How to log command output from telnet session even after logout from the remote serve
 
Hi, All

I want to telnet into a remote server and execute a program in
the remote server from my telnet sessoin. All the command output
of the program can be logged as a file in the remote server even
after logout from the remote server.

I think solaris provides script command to perform the function to
log all command output of a terminal. I did as follows.

Telnet into the remote server. Get the script work for logging the command output.
# script -f log.txt

Script works fine while I login into the remote server. But after logout from the remote server, script stop to log all. I tried to
start the script from background. But I failed to do it.


Please help.


Thanks a lot.

jlliagre 10-15-2006 11:57 AM

The "script" command logs the interactive dialog between the user and the program. This dialog stops when you log out.
If you want to keep the output of a running program after leaving the shell, use the "nohup" command.

UltraSoul 10-15-2006 08:20 PM

Hi, jlliagre

Thank you to tell me the great nohup. Very Helpful.


All times are GMT -5. The time now is 08:51 PM.