1
vote
3answers
2k 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 ...
8
votes
3answers
228 views

If you ^Z from a process, it gets “stopped”. How do you switch back in?

I accidentally "stopped" my telnet process. Now I can neither "switch back" into it, nor can I kill it (it won't respond to kill 92929, where 92929 is the processid.) So, my question is, if you have ...
13
votes
3answers
8k views

How to stop a background process?

I have started a wget on remote machine in background using &. Suddenly it stops downloading. I want to stop its process, then start it again. How can I stop it? I haven't close its shell window. ...
5
votes
4answers
160 views

Best practices for job/process tracking and multi-tasking

I run 10+ different commands from 10+ different directories, and I need a better process to track everything. I do a lot of debugging, and often times I need to work on multiple issues in parallel. I ...
3
votes
3answers
2k views

What happens to suspended jobs in unix?

We can issue CTRL+Z to suspend any jobs in Unix and then later on bring them back to life using fg or bg. I want to understand what happens to those jobs that are suspended like this ? Are they ...
2
votes
1answer
350 views

Please explain the output from the jobs command

When I ran jobs command I see the following output : [1] - Suspended ./startWebLogic.sh [2] + Suspended (signal) top What does -/+ indicate in the second column ? ...
0
votes
2answers
4k views

Get PID of a function executed in the background

#!/bin/bash function abc() # wait for some event to happen, can be terminated by other process { sleep 3333 } echo "PID: $$" abc & echo "PID: $$" I need to retrieve the pid of this function, ...
2
votes
1answer
212 views

What's the best strategy to catch mystery process?

I have running processes on my server that get killed every night at midnight. It's at work, I'm not around when it happens and I don't have remote access. The kill occurs very predicably at 23:59 ...
2
votes
1answer
512 views

How can I manage jobs after I disconnect from my tty/ssh session?

If I ssh to a box and start a task that will take some time to complete I usually press control+z to pause the process, and then immediately type bg 1 to put run it in the background. I can then type ...