Home | Mirror | Search

6. jobs

6.1. &

usage: command &

			
$ grep -r 'neo' / > result &
[1] 10414
			
			

6.2. Ctrl + Z

vim

$ vim

[2]+  Stopped                 vim


mutt

$ mutt

[3]+  Stopped                 mutt
			

6.3. jobs

			
$ jobs
[1]   Running                 grep -r 'neo' / > result &
[2]-  Stopped                 vim
[3]+  Stopped                 mutt
			
			

6.4. fg / bg

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/
			
			

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

comments powered by Disqus