| Welcome to WebmasterWorld Guest from 18.104.22.168 |
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
|Pubcon Platinum Sponsor 2014|
|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 is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved