-2

I know I can run something in the background by adding & to it, such as tail -f log.log

I can then resume or send the job to the foregrond with fg

However, once I do this, how do I send it to the background again? Ctl-z stops the task, and Ctl-c kills it.

When I type bg nothing happens.

  • ctrl+z and command bg – Ipor Sircer Jan 3 '17 at 10:53
2

Once you have use Ctrl+z to stop the process, you can send it to the background with the bg command. You probably want to take a look at the jobs command too.

help bg
bg: bg [job_spec ...] Move jobs to the background.

Place the jobs identified by each JOB_SPEC in the background, as if they had been started with `&'. If JOB_SPEC is not present, the shell's notion of the current job is used.

Exit Status: Returns success unless job control is not enabled or an error occurs.

  • So the idea is to use Ctl-z to stop the process, (and also minimize it) but then typing bg and the job number restarts it? sorry, I find your answer a bit short. – Startec Jan 3 '17 at 11:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.