How to put a job in background & bring it to foreground?

Answers were Sorted based on User's Feedback



How to put a job in background & bring it to foreground? ..

Answer / naveen badam

To run a job in back ground type & at the end of the command
To bring the process to the foreground type fg pid
Pid u can find out by typing jobs cmd

Is This Answer Correct ?    4 Yes 2 No

How to put a job in background & bring it to foreground? ..

Answer / kishore devkate

we can put a job in background by putin & symbol at the end
of the line on the command promt.
example:
#cp -r /var/* /tmp &

We can pull the background job in the foreground by fg
command and pid, before that we have to get the process ID
how to get the process ID see below example.
Example:
#jobs
1+ cp -r /var/* /tmp &
now u can get the job ID then u can bring the job in
foreground see below example

Example:

#fg 1

cp -r /var/* /tmp ----now its show like this

Is This Answer Correct ?    2 Yes 0 No

How to put a job in background & bring it to foreground? ..

Answer / srinivas kalvacherla

Consider one ex.
#cp -r /etc/* /directory &
'&' it takes to background
#ps -ef
check the process that is running in the background
#%cp
to bring to foreground.
Regards
kalvacherla.srinivas@gmail.com

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More Unix AllOther Interview Questions

What is YACC?

0 Answers   Cisco,


How to give root privileges without using SU/sudor ?

1 Answers  


How to put a job in background & bring it to foreground?

3 Answers  


what is difference between kernel and shell?

18 Answers   Juniper Networks,


What are permissions in UNIX?

5 Answers   BMC, University,






How does the inode map to data block of a file?

3 Answers  


how to face veritas NetBAckup interview, where did i find all materials regrding veritas and give details on veritas certification

13 Answers   3i Infotech, ABC, Accenture, ACS, CTS, Genpact, GSK, HP, IBM, Lapiz, Lapiz Digital, Satyam, Symantec, TCS, Veritas,


What is the difference between > and >> operators?

6 Answers  


What is the difference between internal and external commands?

13 Answers   BPL, DOEACC, Engro, Kuvempu University, NIIT, TCS,


What is virtual memory?

2 Answers   BMC,


What UNIX command will control the default file permissions when files are created?

3 Answers  


Is this the command to connect oracle from unix? sqlplus -s username/password. Then what is the -S here...????

1 Answers   TCS,


Categories