Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I used to execute the jobs command I got a list of running processes with their respective process-ID, but in Ubuntu lucid lynx this doesn't seem to be working. Anyone have a solution?

share|improve this question

migrated from stackoverflow.com Jun 15 '10 at 13:31

This question came from our site for professional and enthusiast programmers.

    
Try sleep 15 & jobs -l and you should see an entry listed for the sleep command running in the background. After 15 seconds issue another jobs -l and it will be gone (at some point after pressing enter at the prompt you'll get a "Done" message). – Dennis Williamson Jun 16 '10 at 4:36

jobs displays the status of jobs in the current session (ie. those launched from the terminal you are currently in) only. To get a list of all running processes, try ps -e.

If what you want is jobs but make it output PIDs, run jobs -l.

share|improve this answer
    
jobs -l doesn't seem to be working. ps -e does generate output – Tom Schuermans Jun 15 '10 at 13:31
1  
if jobs -l doesn't do anything, that means you have no process currently running in the terminal where you are typing jobs -l. What exactly is the behavior you want? – houbysoft Jun 15 '10 at 13:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .