Running Linux scripts in background

​By default Linux scripts or applications run in foreground, meaning it is possible to interact with them and see their output.

But there maybe a need to execute these in background . It means this script will be executed, however no output will be displayed to a user.

It maybe useful to launch a long running process in a background and check the status of it once in a while.

Launching a process in background can be done with appending ‘&’ sign after this process.

It is possible to use $! to get id of a process that was executed in background.

YouTube video

Comments

Popular posts from this blog

Absolute and relative path in HTML pages

Errors

goto PHP operator