|
|
bg,fg commands - Linux
|
Views : 810
|
|
Tagged in : Linux
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
Hi..
Any process(job) is running in ur terminal you stop that and get command prompt means you type
"ctrl+Z".You have to run that process in background or foreground by using the commands bg and fg.
Bg:
About bg:
Continus a stopped job in the background.
Syntax:
bg [-l][-p][-x][job]
-l -> Report the process group id and working directory of the job.
-p -> Report only the process group id.
-x -> Replace any job_id founf in command or arguments with the corresponding process group id, and then execute command passing it arguments.
job-> Specifies the job that you want to run in the background.
Examples:
bg -> List the currently running job.
Fg:
About fg:
Continues stopped job by it in the foreground.
Syntax:
fg [%job]
%job -> Specifies the job that you want to run in the foreground.
Examples:
fg -> Typing fg alone will resume the first job were it was left off.
fg 1 -> Specifing the job will resume that particular job. The job id can be determined by running bg.
|
|
By Nirmala, On - 2008-03-14 |
|
|
|