We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [job-control]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
11
votes
3answers
1k views

What is the meaning of & at the end of a command?

I have a startup script line: pyprogramm >> /dev/null 2>&1 & Meanings: >> /dev/null - redirect stdout to null device 2>&1 - redirect stderr to stdout (that is ...
23
votes
4answers
9k views

How to stop a bash while loop running in the background?

I started a while loop as follows: while true; do {command}; sleep 180; done & Notice the &. I thought when I killed the terminal, this while loop would stop. But it is still going. It has ...
14
votes
2answers
815 views

Is there a way to provide serial tasks on terminal while a task is executing (without using a file)?

Suppose there are 2 tasks t1, t2 which can be executed in a serial way as below: t1 ; t2 # OR t1 && t2 Now suppose I forgot to run t2 and t1 is already running; can I add t2 to the pipeline ...
8
votes
1answer
3k views

How to resume terminal functionality after issuing the “suspend” command?

I typed suspend in my terminal, and it suspended the execution. How do I get back to normal terminal functioning? I've tried Ctrl+C, Ctrl+D, Ctrl+Q (as suggested here), and Ctrl+Z, but none of these ...
1
vote
0answers
48 views

Shared CUDA job server

I am using 16.04 to run my CUDA projects, all is working well. The way that I currently use the server is to transfer files to the server and SSH in to run the code and view the output, which is okay ...
20
votes
3answers
47k views

How can I run OpenVPN as root in the background, in a script?

I'd like to write a script that calls openvpn first, followed by ssh. When typing the command sudo openvpn ~/my_connection.ovpn in the command prompt I get the following output: ... Wed Jan 4 21:...
16
votes
2answers
11k views

How to send a process to background and foreground?

If I do ping google.com &, the process goes into the background and keeps showing me the ping details. I can still use terminal with other commands, but the output from ping and output from other ...
10
votes
4answers
22k views

How to find still running processes in a terminal?

When I try to close a tab in Gnome Terminal, it says: Close this terminal? There is still a process running in this terminal. Closing the terminal will kill it. How can I find out what is still ...
1
vote
0answers
59 views

HIbernation or Suspending & Restarting for NON-root users

My purpose is to run a main shell script which calls many sub-processes like other shell scripts, perl sources, and compiled c++ files. I want to run the main shell script "run.sh" at some line in ...
65
votes
3answers
143k views

What should I do when I get 'There are stopped jobs' error?

I face this type of situation many times. For example, whenever I try to open some file in emacs with sudo rights using: sudo emacs tet.c & Instead of asking me for the password Ubuntu just ...
2
votes
1answer
257 views

Queue manager for a laptop?

Is there a lightweight queue manager for Kubuntu? Something like torque, but as I understand it - torque works for clusters only - while I want the similar thing for my laptop. The problem is - I'd ...
6
votes
2answers
14k views

how do you background a ssh process?

I know you can suspend a ssh session with ~^z, but is there also a way to background it so that it continues working while you do something else in the local shell?
1
vote
1answer
10k views

What is the difference between jobs and services? [duplicate]

Possible Duplicate: What's the difference between “Service” and “/etc/init.d/”? So what are the differences between jobs that are located in /etc/init/, which I call ...
4
votes
1answer
236 views

Is there a way to put the foreground job in the background with a key binding?

To put the foreground job, in the background, I press cltr+Z and then bg [job-number]. Is there a way to do this in one step instead of two, with some cltr+[key] command? And I don't mean the &. ...
11
votes
1answer
17k views

“respawning too fast, stopped”. How to make UPSTART disable for 5 mins?

In the old days, the init daemon used to disable tasks that were respawning too fast. I discovered to my peril that UPSTART just stops them. forever. I have found the COUNT and INTERVAL controls for ...
99
votes
7answers
86k views

What to do when Ctrl-C won't kill running job?

Sometimes, processes ignore the SIGINT signal sent by Ctrl-C in Bash. For instance, man and vi. Assuming you don't want to google or read the manual on how to exit the running process, is there any ...
2
votes
3answers
1k views

stop program from terminal if running for more than x seconds

so by typing /.blabla I launch the program blabla. Is there a way, from the terminal, to stop (i.e. equivalent of ctrl+c) blabla has been running for more than x secs? (I'm trying to test a program ...