H I O X INDIA
LINUX Commands
 HOME  ||  Scripts  ||  Purchase  ||  Tutorials  ||  Images  ||  Tools  ||  Templates 
  :-)  Send Page   :-)   Feedback   :-)   Register   :-)   Links   :-)   Support   :-)
Español Français 中文 Deutsch
 Forums   Hosting   Internet Stats   Easy Calculation   FUN Games 

LINUX / UNIX cmd
Introduction
Commands in A
Commands in B
Commands in C
Commands in D
Commands in E
Commands in F
Commands in G
Commands in H
Commands in I
Commands in J
Commands in K
Commands in L
Commands in M
Commands in N
Commands in P
Commands in R
Commands in S
Commands in T
Commands in U
Commands in W
Commands in Y
More about Linux
Feedback




bg Linux Commands


Topic

What is Linux bg Command?




Explanation

bg COMMAND:
     bg command is used to place a job in background. User can run a job in the background by adding a "&" symbol at the end of the command.

SYNTAX:
  The Syntax is
     bg [options] [job]

OPTIONS:
     
-l Report the process group ID and working directory of the jobs.
-p Report only the process group ID of the jobs.
-x Replace any job_id found in command or arguments with the corresponding process group ID, then execute command passing it arguments.
job Specifies the job that want to run in the background.



EXAMPLE:
     
  1. To Run a process in background
    kmail- start the email client application.
    
    Press ctrl+z to stop the current job.

    Now just type bg to move last stopped job to background.

  2. To move the specified job to back ground:

    Lets start some three jobs and suspend those process in background.

    kmail- start the email client application.
    Press ctrl+z to stop the current job.
    xmms- music player application.
    Press ctrl+z to stop the current job.
    sleep 120- a dummy job.
    Press ctrl+z to stop the current job.
    jobs
    The above command will display the jobs in the shell.
    [1]   Stopped                 kmail
    [2]-  Stopped                 xmms
    [3]+  Stopped                 sleep 120
    
    bg 2
    The above command will start running the xmms application. In such way you can start running the specific background process.
    jobs
    [1]-  Stopped                 kmail
    [2]   Running                 xmms &
    [3]+  Stopped                 sleep 120
    





        Find LINUX Commands... Hope you enjoy this tutorial. We welcome your Valuable feedbacks or suggestions on this LINUX / UNIX cmd reference. This is a copyright content.


privacy policy     license     sitemap
© 2004-2009 HIOX INDIA - hioxindia.com

Other Links