The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
0answers
7 views

Replacement queue now that batch doesn't accept input files?

Background I work at a research institute, and have for a long time used the batch command to submit job queues to our machines. However, a recent update changed the batch command to be ...
1
vote
1answer
28 views

Start a background process from a script and manage it when the script ends

I'd like to run and configure a process similarly to a daemon from a script. My shell is zsh emulated under Cygwin and the daemon is SFK, a basic FTP server. For what matters here, the script ...
1
vote
1answer
75 views

Running commands after ampersand symbol & in a remote ssh session

I have a shell script that initiates a long, resource-intensive command on several different machines. In order to execute the script on each machine in parallel, I have an ampersand symbol after ...
1
vote
1answer
33 views

Run program while computer is cool

I'm trying to compile a program on a computer with inadequate cooling. The program, specifically, is the linux-ck kernel with -mtune=native march=native processor-specific optimizations, so simply ...
4
votes
3answers
140 views

Get PID of any command in backgrounded piped sequence of commands

If, in bash, I execute: cmd1 | cmd2 | ... | cmdi | ... | cmdn & where the cmd{1..n} may not be distinct, how do I get the PID of cmdi? Alternatively, how can I signal the cmdi process? (For ...
0
votes
2answers
53 views

How to know when a job in screen finishes?

Is it possible to know if a script executed inside a screen session finished or not? The script can be seen by typing jobs and I would like to terminate the screen session when the script is finished. ...
3
votes
2answers
70 views

What would stop a task from being run in the background?

I have a script I'm trying to launch with php ./Script.php & The task goes into the background but it is stopped. When I try to run it with bg it simply stays stopped. $ jobs [1]+ Stopped ...
0
votes
0answers
16 views

How to cancel my job [duplicate]

I'm a beginner about LINUX in korea and English is too. I'm circulating some simulation by using the LINUX cluster but I have some problem in my job. I want to cancel any job (ID : 750, 752, 753 ...
0
votes
1answer
19 views

Starting up and keeping up a process

I am having an Ubuntu box on which I am having a Haskell process (think of it as a random server process) that I built. I want to start it on boot and restart it in case it fails for whatever reason ...
0
votes
1answer
30 views

How to dynamically chose PBS queue during job submission

I run a lot of small computing jobs in remote cluster where job submission is managed by PBS. Normally in a PBS (bash) script I specify the queue that I would like to submit the job through the ...
1
vote
1answer
49 views

Submitting jobs with sequential completion

If I have numerous jobs that rely on environment variables, how can I submit them sequentially? Here is my attempt that has not been working, week 6 is always submitted (and finishes) before week 5. ...
0
votes
2answers
61 views

UNIX: Submit job only after previous job completes?

I would like to submit the same .sas job iterating over an argument, but I would like job only to be submitted after the previous is completed. Here is my attempt: #!/bin/ksh export weeks="1 ...
4
votes
4answers
327 views

disabling job control in bash (CTRL-Z)

It happens to me sometimes, that I press CTRL+Z by accident and my application disappears into background. I know, I can bring it back with fg, so it's not such a big deal. But I am wondering about ...
2
votes
1answer
959 views

ctrl c vs. ctrl z with foreground job

Ctrl+Z stops the job whereas Ctrl+C kills the job. Why is that? Wouldn't the other way make more sense? z@z-lap:~$ sleep 100& [1] 4458 z@z-lap:~$ sleep 200& [2] 4459 z@z-lap:~$ jobs [1]- ...
2
votes
1answer
155 views

Queue a task in a running shell

I often start a long running command that is bound to either CPU, Disk, RAM or Internet connection. While that is running, I find that I want to run a similar command. Let's say downloading something ...
3
votes
5answers
556 views

Run a process to particular/dedicated pid only

I have a c program executable or shell script which I want to run very often. If I want to stop/pause or to notify something I will send signal to that process. So every time I have to check the pid ...
1
vote
0answers
47 views

Why doesn't putting elinks in background and then resuming with `fg` work reliably?

The elinks program takes over the terminal to let you browse the web. But its behavior in the context of job control is wonky. If I CTRL-Z suspend an elinks session, and then try to resume it with ...
0
votes
1answer
84 views

When executing a command, it is automatically suspended

The problem happened on one of my local machines with CentOS 6. I ssh to it from my MacBook trying to test a script, which is in /usr/local/bin. However, whenever I tried to execute the command, it is ...
1
vote
3answers
5k views

How to get the Job ID? [duplicate]

As we know, the shell enables the user to run background processes using & at the command line's end. Each background process is identified by a job ID and, of course, by it's PID. When I'm ...
0
votes
1answer
65 views

Stop tailing log

I have a problem, I accidentally did tail -f on a log, but now I cant quit! - Its the anaconda log during a redhat install. Control-C doesn't seem to work, I guess due to it saying sh: no job control ...
1
vote
1answer
180 views

fg a bg process because you forgot to redirect output to /dev/null

I did Ctrl+Z bg with the intention of disowning next, but I forgot to redirect, now I cant get to my terminal because the scrolling of the output (tarballed a huge directory with verbose set). How do ...
1
vote
4answers
65 views

how to close the jobs one by one? is there any options?

There is list of jobs running. pdf is opened image is opened text file opened It's all in fg/bg . Is there any option to close the particular job forcefully? Also, I want to know if the jobs can ...
3
votes
2answers
769 views

What is “Exit 2” from finished background job status?

I have an exercise to put in a file some data (*conf from some directories) and need to do this in background. I did it and I am wondering what is the meaning of output messages: [A@localhost tests]$ ...
3
votes
3answers
535 views

Pipe command output to input of running/backgrounded command

In Bash 4.X It it possible to do something like: command that expects input & echo some output | %1 Where %1 represents the first backgrounded command?
2
votes
1answer
95 views

What is the purpose of abstractions, session, session leader and process groups?

I understand from Informit article that sessions and process groups are used to terminate descendant processes on exit and send signals to related processes with job control. I believe this ...
3
votes
3answers
230 views

Quick access to work directory of background job

Minimal effort to reproduce what I am looking for, is as follows /$ sleep 1h & [1] 6564 /$ cd ~$ jobs [1]+ Running sleep 1h & (wd: /) When I use jobs to manage my ...
2
votes
1answer
112 views

mpd daemon prematurely ending jobs

I am a little out of my depth here so bear with me. I am trying to configure mpirun and mpiexec to run software called Materials Studio on a 1 node, 2 processor, 12 core cluster. The submission scheme ...
4
votes
1answer
133 views

Understanding when background process gets terminated

I have a script which starts a number of background processes and if works fine when called from the cmdline. However the same script is also called during my xsession startup and additionally on ...
4
votes
1answer
349 views

why do background jobs hang depending on the size of the output?

I had some stress-testing scripts that were running in parallel and they would hang after finishing and would wait for a RETURN keystroke to exit. After investigating I discovered that it is not ...
2
votes
1answer
257 views

Can I transfer running process from dead ssh [duplicate]

Possible Duplicate: How can I disown a running process and associate it to a new screen shell? I have started (as expected) a long copy process from ssh shell (putty) which died due to ...
2
votes
2answers
94 views

How to supress the display of previous job details?

When I run a process in the background the process ID gets displayed in the command prompt. For example: $ gvim 1 & [3] 9584 Now when I run another process the state of the previous one also ...
1
vote
1answer
203 views

Application in terminal still running but not directly accessible [duplicate]

Possible Duplicate: How to suspend and bring a background process to foreground I have kind of an odd problem which I haven't encountered before. Here's what I did: I started an ...
0
votes
1answer
319 views

How to make a scheduled task based on a file creation time?

The supercomputer I run my Analysis uses SGE to do the job management and requires each job duration not longer than 24 hours. And this feature is causing me quite a headache. Sadly, I was asked to ...
8
votes
2answers
1k views

Concept of controlling terminal in Unix

Can some one please explain in an easy to understand way the concept of controlling terminal in unix and unix like systems ? Is it related to a session ? If yes, then how ?
1
vote
3answers
1k views

How can I kill a job that was initiated in another shell (terminal window or tab)?

If I begin a process and background it in a terminal window (say ping google.com &), I can kill it using kill %1 (assuming it is job 1). However if I open another terminal window (or tab) the ...
1
vote
2answers
729 views

How to Kill Difficult Task in Mac Terminal

I ran this grep: grep -r "\-\-\-foo\-\-\-" * | grep -vi bar For the past 5 minutes my Mac has been running hot (I can hear the fan) and I can't hit Ctrlz or x or c to kill the current task. Even ...
9
votes
4answers
5k views

How can I kill and wait for background processes to finish in a shell script when I Ctrl+C it?

I'm trying to set up a shell script so that it runs background processes, and when I Ctrlc the shell script, it kills the children, then exits. The best that I've managed to come up with is this. It ...
1
vote
1answer
156 views

Is it possible to disconnect a GUI program launched within vifm from vifm?

One can launch GUI programs, for example, gv or xpdf from vifm in background in vifm's command line: :!gv %f & However, if gv is launched by pressing Enter on a file like aPSfile.ps in vifm, ...
3
votes
1answer
4k views

How to recover a backgrounded job from a previous shell? [duplicate]

Possible Duplicate: How can I disown a running process and associate it to a new screen shell? I launched a command that lasts a long time. I had to disconnect so I moved it in the ...
3
votes
1answer
656 views

How do I detach a process from its parent? [duplicate]

Possible Duplicate: How can I disown a running process and associate it to a new screen shell? The problem is that the process is not a job inside of my active shell (as I've logged in from ...
1
vote
3answers
2k views

Bash wait for jobs and limit job count [duplicate]

Possible Duplicate: Four tasks in parallel… how do I do that? Suppose a loop invoking a command grep -v '#' < files.m3u | sed 's/\\\\/\/\//g' | sed 's/\\/\//g' | while read line ...
25
votes
2answers
30k views

How to suspend and bring a background process to foreground

I have a process originally running in the foreground. I suspended by Ctrl+Z, and then resume its running in the background by bg <jobid>. I wonder how to suspend a process running in the ...
5
votes
2answers
806 views

Why jobs aren't killed at logout when executed with “> /dev/null 2>&1 &”?

When you run jobs like the example below, they're killed when you logout: $ ./job.sh & However, when you execute them as in the below example, redirecting stdout to /dev/null and stderr to ...
1
vote
2answers
325 views

What is the real-world use of the bg command?

This is the output: [USER@SERVER ~] ping localhost PING localhost (127.0.0.1) 56(84) bytes of data. 64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.037 ms 64 bytes from localhost ...
3
votes
3answers
2k views

How to schedule something run once using anacron?

Frequently within my scripts I schedule auxiliary tasks for later in the form: at now + 8 hours <<< "rm -f workfile.$$ >> $worklog 2>&1 " or at 11pm + $(date +%M) minutes ...
0
votes
0answers
137 views

Job IDs and their meaning/reference

Using Red Hat, I sent few jobs to a cluster and got "job IDs" in return. Using qstat I can see only one is running, one was canceled and the rest are still in the queue. I wrote something like this: ...
1
vote
2answers
852 views

Basic job control: stop a job, add a job onto the stack, and `fg`

Job control is probably my favorite thing about Linux. I find myself, often, starting a computationally demanding process that basically renders a computer unusable for up to days at a time, and being ...
2
votes
1answer
275 views

Why doesn't an orphan process receive signals?

I have two shell scripts: launch_job.sh and sub_job.sh. If launch_job.sh uses the following method to run sub_job.sh: nohup sub_job.sh & sub_job.sh becomes an orphan, i.e. with PPID 1. I ...
5
votes
1answer
1k views

Why do backgrounded processes sometimes stop spontaneously?

Sometimes, some time after I've backgrounded a process with bg in bash, when I press Enter in the same shell to redisplay the prompt (just to check that I'm still in bash when some output from the ...
2
votes
3answers
2k views

Where do background jobs go?

From gnome-terminal I know the ability to suspend a job with C-z, and then send it to the background. When I close the terminal the process does not end. Where is the job being managed from, or is it ...