LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   output of jobs command (http://www.linuxquestions.org/questions/linux-software-2/output-of-jobs-command-563880/)

jhwilliams 06-23-2007 12:17 AM

output of jobs command
 
Code:

[root@sage gz_files]# jobs
[1]  Running                tar -czf mp3.tar.gz ../Media/MP3/ &
[2]-  Running                tar -czf pictures.tar.gz ../Media/Pictures &
[3]+  Running                tar -czf audio.tar.gz ../Media/Audio/ &

what are the plus and minus signs for?

avallach 06-23-2007 01:07 AM

man jobs doesn't hurt ;)
Quote:

The character '+' identifies the job that would be used as default for the fg or bg utilities; this job can also be specified using the job_id %+ or "%%" . The character '-' identifies the job that would become the default if the current default job were to exit; this job can also be specified using the job_id %-.

jhwilliams 06-23-2007 01:14 AM

my man pages had jobs under bash bulletins ... didn't seem to have any info on the +/-. Probably should have looked for a different manual version online before coming here... Thanks for the answer though!

UhhMaybe 08-27-2007 12:06 AM

Try here...http://en.wikipedia.org/wiki/Job_Control_Language...and here as well...http://en.wikipedia.org/wiki/Job_control...good luck to YOU.

Tinkster 08-27-2007 04:30 AM

Quote:

Originally Posted by jhwilliams (Post 2797250)
my man pages had jobs under bash bulletins ... didn't seem to have any info on the +/-. Probably should have looked for a different manual version online before coming here... Thanks for the answer though!

Yup ... a bash built-in.
Quote:

Originally Posted by man bash
Code:

      job stopped while it was in the foreground  or  started  in  the  back-
      ground.  The  previous job may be referenced using %-.  In output per-
      taining to jobs (e.g., the output of the jobs command), the current job
      is  always flagged with a +, and the previous job with a -.  A single %
      (with no accompanying job specification) also  refers  to  the  current
      job.


Of course RedHat may have fubared the man-pages for bash ...



Cheers,
Tink


All times are GMT -5. The time now is 06:56 AM.