homepage Welcome to WebmasterWorld Guest from 54.234.128.25
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
Run a Command and Exit SSH
HoboTraveler




msg:3539495
 2:52 pm on Jan 3, 2008 (gmt 0)

Hello,

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.

Thanks.

 

timster




msg:3539595
 4:19 pm on Jan 3, 2008 (gmt 0)

You can try using the screen command.

[rackaid.com ]

lammert




msg:3539753
 6:47 pm on Jan 3, 2008 (gmt 0)

You can use the nohup (no hangup) command for this.

For example:

nohup php script.php &

Output and error messages are automatically placed in the file nohup.out in the current directory.

wheel




msg:3540493
 5:02 pm on Jan 4, 2008 (gmt 0)

I use the screen command myself in this situation.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved