How can I suppress “Terminate batch job (Y/N)” confirmation in PowerShell?

tl;dr The cause of the problem is that gulp (and any other command that shows this message) is actually a batch file (*.cmd, *.bat) and the behavior is built into cmd.exe, the interpreter of batch files. Package managers are increasingly providing PowerShell scripts (*.ps1) as well (see bottom section), which bypasses the problem when running … Read more

Run a shell script and immediately background it, however keep the ability to inspect its output

To ‘background’ a process when you start it Simply add an ampersand (&) after the command. If the program writes to standard out, it will still write to your console / terminal. To foreground the process Simply use the fg command. You can see a list of jobs in the background with jobs. For example: … Read more

In what order should I send signals to gracefully shutdown processes?

SIGTERM tells an application to terminate. The other signals tell the application other things which are unrelated to shutdown but may sometimes have the same result. Don’t use those. If you want an application to shut down, tell it to. Don’t give it misleading signals. Some people believe the smart standard way of terminating a … Read more

Putting a process in the background without stopping it – (ctrl+z)? [closed]

Yes, absolutely: screen(1) is the answer. To get started, add screen -R to ~/.bash_profile or equivalent, log out, and log back in. To continue what’s running in the background, press Control-A then N. This will create a new terminal screen in the foreground while seamlessly continuing your running process on the background. Press Control-A then … Read more