11-02-2009
Scott - Thanks for your reply.There are three background jobs submitted from same directory.How can I determine which background job updated this nohup.out file?
Is there any command or series of commands to correlate background job with timestamp like syslog or etc...?
Thanks,
Mansoor.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I try to run a script as background job.
script:
#!/usr/bin/csh
/usr/bin/date +20%y-%m-%d > ~/datsql.txt
If I start it I got this output:
tac> ./datermitteln&
293
+ Stopped (SIGTTOU) ./datermitteln&
I insert the following line inside my script, but without any... (3 Replies)
Discussion started by: joerg
3 Replies
2. UNIX for Dummies Questions & Answers
Hiya,
Recently I've run a few scripts in the foreground, but have realised later they should of been better nohup'd and placed in the background. I understand how to change a foreground job into a background one, but how would put the job into the nohup state?
Thanks (1 Reply)
Discussion started by: rdbooth
1 Replies
3. UNIX for Dummies Questions & Answers
on gnome i open a terminal and run wget http://soommmething & in the background. because wget shows me downloading progress percentage and download speed continuously, I exit the gnome-terminal
after a while i want to see the download percentage but dont know how. my ps -u myname shows that... (3 Replies)
Discussion started by: babayeve
3 Replies
4. Solaris
Hi,
Thanks in advance.
i need to kill a unix background running job after that job process completes.
i can kill a job by giving the following unix command
kill -9 processid
how to kill the job after the current process run gets completed ?
Appreciate your valuable help.
Thanks... (7 Replies)
Discussion started by: dtazv
7 Replies
5. Shell Programming and Scripting
Hi Experts,
I need a script advice to schedule 12 jobs ( SAS Codes execute back ground ).
Algorithem:
1. Script checks first job.
2. Finds first job is done; invoke second job.
3. finds second job is done; invoke third job.
..
Request you to please assist. (3 Replies)
Discussion started by: Jerald Nathan
3 Replies
6. Shell Programming and Scripting
Hi,
The HPCs I used earlier used PBS (Portable Batch System) to schedule when I was running various jobs and it had an option to send me an email once a job is completed.
I'm wondering whether this is possible for any other process (without the use of PBS). For example, I'm running some codes... (2 Replies)
Discussion started by: lost.identity
2 Replies
7. Shell Programming and Scripting
Hello Everyody,
Having a doubt.
sort file1 &
when we sent a job to the background it returns
Job Number
PID
again if we want to ... (1 Reply)
Discussion started by: knroy10
1 Replies
8. Shell Programming and Scripting
I'm running diff at the command prompt against two very large text files (>1GB) and system kills the process and replys back "Terminated" after 15 seconds.
I believe a system parameter needs to be adjusted but can't figure it out.
I'm running Red Hat 4.1.2-46, 2.6.18-028stab089.1
Thanks... (4 Replies)
Discussion started by: azpetef
4 Replies
9. Shell Programming and Scripting
How to bring a backgroud job say sample_script.sh to foreground (4 Replies)
Discussion started by: rafa_fed2
4 Replies
10. Shell Programming and Scripting
HI All,
I need the answer of below question?
1) how to find the shellscript which is running In background is completed or not ?
ex: I know the shellscript name abc.sh which is running in background through cronjob. I want to know this is job is still running or stopped, how to... (3 Replies)
Discussion started by: pspriyanka
3 Replies
fg(1) General Commands Manual fg(1)
NAME
fg - Runs jobs in the foreground
SYNOPSIS
fg [job_id...]
Note
The C shell has a built-in version of the fg command. If you are using the C shell, and want to guarantee that you are using the command
described here, you must specify the full path /usr/bin/fg. See the csh(1) reference page for a description of the built-in command.
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
fg: XCU5.0
Refer to the standards(5) reference page for more information about industry standards and associated tags.
OPTIONS
None
OPERANDS
Specifies the job to be run as a foreground job. If no job_id operand is given, the job_id for the job that was most recently suspended,
placed in the background or run as a background job is used. The format of job_id is described in the Jobs section of the ksh(1) reference
page.
DESCRIPTION
If job control is enabled (see the description of set -m in the ksh(1) reference page), the fg utility moves a background job from the cur-
rent environment into the foreground.
Using fg to place a job into the foreground removes its process ID from the list of those "known in the current shell execution environ-
ment"; see the Jobs section of the ksh(1) reference page.
RESTRICTIONS
If job control is disabled, the fg utility exits with an error and no job is placed in the foreground. The fg utility does not work as
expected when it is operating in its own utility execution environment because that environment has no applicable jobs to manipulate.
EXIT STATUS
The following exit values are returned: Successful completion. An error occurred.
ENVIRONMENT VARIABLES
The following environment variables affect the execution of fg: Provides a default value for the internationalization variables that are
unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization vari-
ables contain an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string value,
overrides the values of all the other internationalization variables. Determines the locale for the interpretation of sequences of bytes
of text data as characters (for example, single-byte as opposed to multibyte characters in arguments). Determines the locale used to
affect the format and contents of diagnostic messages written to standard error. Determines the location of message catalogues for the
processing of LC_MESSAGES.
SEE ALSO
Commands: bg(1), csh(1), jobs(1), kill(1), ksh(1), sh(1p), wait(1)
Standards: standards(5)
fg(1)