-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.

Startec
  • 107
  • 3

1 Answers1

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.

user9517
  • 114,104
  • 20
  • 206
  • 289
  • 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 03 '17 at 11:10