| Welcome to WebmasterWorld Guest from 22.214.171.124 |
register, login, search, subscribe, help, library, PubCon, announcements, recent posts, open posts,
|Run a Command and Exit SSH|
| 2:52 pm on Jan 3, 2008 (gmt 0)|
I login to the server over SSH.
I am looking for a way that would allow me to run a command and then be able to exit SSH.
$ php script.php
The ampersand after the command does not work. The command goes into the background allright. However, the command terminates after I close the SSH window.
Any ideas and tips appreciated.
| 4:19 pm on Jan 3, 2008 (gmt 0)|
You can try using the screen command.
| 6:47 pm on Jan 3, 2008 (gmt 0)|
You can use the nohup (no hangup) command for this.
nohup php script.php &
Output and error messages are automatically placed in the file nohup.out in the current directory.
| 5:02 pm on Jan 4, 2008 (gmt 0)|
I use the screen command myself in this situation.
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld ® and PubCon ® are a Registered Trademarks of Pubcon Inc.
© Pubcon Inc. 1996-2012 all rights reserved