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 > Community > Team MacNN > Help!!! CLI Newbie here, can't undo & switch

Help!!! CLI Newbie here, can't undo & switch
Thread Tools
Fresh-Faced Recruit
Join Date: Jul 2003
Status: Offline
Reply With Quote
Jan 21, 2004, 02:03 PM
 
Hey, I'm a CLI newbie and just discovered the wonders of the & switch. Well, I can't figure out a way to get back to the text readout of CLI app now. (the process is still running)
Thanks!
     
Mac Elite
Join Date: Nov 2003
Location: Minnesota
Status: Offline
Reply With Quote
Jan 21, 2004, 02:09 PM
 
First, type

jobs

You should see something like the following:

[X]+ Running process_name

Just type

fg %X (where X is the number from above)

to bring the process to the foreground.
     
Fresh-Faced Recruit
Join Date: Jul 2003
Status: Offline
Reply With Quote
Jan 21, 2004, 02:26 PM
 
Ok, cool. Thanks for the quick response. I couldn't get the job listing though. It seems like the tcsh understands the command 'jobs', as it doesn't return 'command not found.' The computer just returned another prompt (with the name of the computer/user or whatever). Should jobs be in the same directory level as top, or do I need to change directories?

Having this trouble, I hunted around in the man page for jobs ('man jobs' returned me the entire tcsh man page and I had to scroll down a long ways to jobs--any easier way of doing this?) and it basically said what you have, im just vexed as to why typing jobs won't return a list of jobs. Thanks!
     
Mac Elite
Join Date: Nov 2003
Location: Minnesota
Status: Offline
Reply With Quote
Jan 21, 2004, 02:32 PM
 
You probably started that process from a different terminal. If you can, do what I said before from a prompt in that terminal.

If you killed the terminal that spawned that process, I'm not sure how you would go about bringing it to the foreground.
     
Fresh-Faced Recruit
Join Date: Jul 2003
Status: Offline
Reply With Quote
Jan 21, 2004, 02:36 PM
 
Yeah, I completely exited terminal and then opened it up again. Hrm, seems I may have to just kill the thing. Anyone else want to enlighten me in the ways of UNIX? Thanks
     
Senior User
Join Date: Feb 2002
Location: Silly Valley, Ca
Status: Offline
Reply With Quote
Jan 21, 2004, 04:19 PM
 
I would try and avoid putting stuff into the background that you will want to foreground again later, unless you are going to keep the shell (Terminal window) open.

do a
ps ux
to list the processes, find the PID of the fah4 (or whatever you named the client) and then
kill PID
where PID is the number.
It will shutdown F@H properly so you don't lose any work at least.
Note that if you started the process as the root user you will need to
sudo kill PID
instead.

Why did you want to foreground it anyway?
If you just want to check progress, cd to the directory with F@H in it and do
cat unitinfo.txt
If you want even more info, cd into the work directory from there and do
cat logfile_00.txt
You may need to look at other logfiles in there if you have had any unexpected shutdowns.
     
Fresh-Faced Recruit
Join Date: Jul 2003
Status: Offline
Reply With Quote
Jan 21, 2004, 05:19 PM
 
Thanks!
     
Forum Regular
Join Date: Nov 2002
Location: Santa Barbara CA
Status: Offline
Reply With Quote
Jan 21, 2004, 05:20 PM
 
In the folding directory there is a file FAHlog.txt. This contains exactly what you would see if ran folding in a terminal in the foreground. If want to keep tabs on what is going on run:

tail -n 30 -f FAHlog.txt

The -n 30 flag will show you the last 30 lines in the file. The -f will mean that it keeps watching the file and will update the display if any lines are added. To quit type either command-. or control-c.

You used to have to look at the logfile_00.txt because the OSX client didn't update the FAHlog.txt correctly. Now you can just look at that instead and not worry which one of the logfile_0(some number).txt files happens to be active.
     
   
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 11:31 PM.
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