usage: command &
$ grep -r 'neo' / > result &
[1] 10414
vim
$ vim
[2]+ Stopped vim
mutt
$ mutt
[3]+ Stopped mutt
$ jobs
[1] Running grep -r 'neo' / > result &
[2]- Stopped vim
[3]+ Stopped mutt
usage: fg [job_spec]
$ fg 2
usage: bg [job_spec ...]
$ cp -r /usr/ /tmp/
Ctrl + Z
[1]+ Stopped cp -r /usr/ /tmp/
$ bg
[1]+ cp -r /usr/ /tmp/ &
$ fg
cp -r /usr/ /tmp/
13.7.5. nohup - run a command immune to hangups, with output to a non-tty
nohup command > myout.file 2>&1 &
nohup command >/dev/null 2>/dev/null &
nohup command &>/dev/null
You may using 'jobs' to display task.
and using 'fg %n' to close that.
neo@MacBook-Pro ~ % sleep 10 &
[1] 2967
neo@MacBook-Pro ~ % wait
[1] + 2967 done sleep 10
wait 将一只停留,等待 sleep 10 运行完毕。