O'Reilly logo

Linux and Unix Shell Programming by David Tansley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

3.3. The & command

When you run a job in the foreground, your terminal is then tied up whilst the job is running. Running a job or command in the background, does not tie up your terminal. Use the & command.

The general format is:

command & 

Why would you run a command in the background? Well, running it in the background runs it now at that instant without tying up your terminal. Tasks ideal for this are find, big print jobs, big sorts, and scripts. Please be careful with background processing: do not use commands that require user-input, or your PC will sit there doing nothing.

However, because jobs are running in the background all output would still hit your terminal. If you are running a command that puts a lot of output to the screen then ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required