- Running Programs in Background, and Output Redirection. (Unix/Linux) When you type $ run myprog the program 'myprog' executes in 'foreground' i.e. you have to wait for your program to finish before you can issue other commands (you have to wait for your $ prompt to appear). An alternative way to execute a program is to run it in 'background'. This is achieved with the & symbol: $ run myprog & This puts the program execution into background leaving you free to issue other commands, or even logoff, while you wait for your program to finish. This is useful for programs that take a few minutes or more to run (but not useful if your program requires keyboard input). When running a program in background it is sometimes necessary to redirect its screen output to a file, this is done using the '>' (output redirection) symbol: $ run myprog > myprog.output & This command sequence reads "run the program called myprog redirecting the screen output to the file called myprog.output; do all of this in background". You can also use output redirection for programs running in foreground (simply omit the & symbol from the last example). The command 'submit' does all this for you, e.g. $ submit myprog the 'submit' command sends you an email when your program has finished.