Wednesday, 14 September 2011

How to bring a Background job to Foreground ?

Below command is to get the list of jobs
jobs -l
Below command is to bring the background job to foreground
fg %jobnumber
Mistakenly if you press Ctrl+zz instead of Shft+zz to save a file from vi editor,
You will come out from vi editor with following  message.
[1] + Stopped (SIGTSTP) vi yourfilename
Current vi process will be moved to background mode, you can use below command to get into vi editor again.
fg %jobnumberofviprocess 


No comments:

Post a Comment