Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > nohup does not work for me, please help!

nohup does not work for me, please help!
Thread Tools
Baninated
Join Date: Sep 2003
Status: Offline
Reply With Quote
Oct 18, 2003, 08:07 AM
 
OK, I would like to use nohup so I can run something on a server, log out and read the output of that program from a file when I log back in the next time.

I tried to do this:

remote_server% nohup find / -name "foo.txt" -print &
remote_server% exit

When I logged back in I couldn't find the nohup.out file even though the man pages claimed it should contain the output of my find command. Then I tried this:

remote_server% nohup find / -name "foo.txt" -print > nohup_ouptut.txt &
remote_server% exit

When I logged back in there was a file nohup_ouptut.txt but it was empty.

Can anybody here tell me how I can get this to work? It's important because I would like to let simulations run on a server, log out, take my PowerBook home over night, and check the results in the next morning. Right now, it's either leave the PowerBook at the office or kill the simulation run when you log out the PowerBook.
     
Mac Elite
Join Date: May 2001
Status: Offline
Reply With Quote
Oct 19, 2003, 07:30 PM
 
It should work the way you tried. Of course, if the file(s) you are searching for don't exist you won't get any output.
Also if you exit immediately after issuing the command (because you run a script) there might be no time for nohup to start the 'find', so give it a second or two before logging out.

If everything fails, have a look at the 'screen' utility, it will allow you to keep a virtual terminal session open between logins. It's installed on OS X 10.2 so you can type 'man screen' for more info. You might need to install it on that remote machine though if it's not there.

-
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 04:03 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2