tags:

views:

236

answers:

2

especially the last two with '-' and '+' respectively, what does it mean on earth?

[1]   Done                    php start.php bots/admin32.bot.php

[2]   Done                    php start.php bots/admin36.bot.php

[3]   Done                    php start.php bots/admin10.bot.php

[4]   Done                    php start.php bots/admin11.bot.php

[5]   Done                    php start.php bots/admin13.bot.php

[6]   Done                    php start.php bots/admin3.bot.php

[7]-  Done                    php start.php bots/admin4.bot.php

[8]+  Done                    php start.php bots/admin7.bot.php

[root@www2 robot]#
+1  A: 

I think your command contains the character &, which is causing the command to run in the background. When the command finishes, it prints this output.

Example:

$ echo 1 &
[1] 16021
$
[1]+  Done                    echo 1

To prevent this from happening, quote the & character. It's probably part of a URL in your case, so you can use:

$ wget "http://www.example.com/index.php?a=1&b=2"

As for the + and - signs, they refer to the current and previous jobs respectively. See this page on job control in bash for more info.

Ayman Hourieh
when you talk about it as it's done,do you mean the process died ?but I used ps -ef only to find it's still alive.
Shore
When the word 'Done' is printed, it means that the process is finished executing. You probably have many processes running the same command or something.
Ayman Hourieh
`ps -e` shows all processes on the system. For only those belong to your current session, use plain `ps` (`ps -H` gives you a tree view).
ephemient
+8  A: 

From the Bash Reference Manual,

Job number n may be referred to as ‘%n’. The symbols ‘%%’ and ‘%+’ refer to the shell's notion of the current job, which is the last job stopped while it was in the foreground or started in the background. A single ‘%’ (with no accompanying job specification) also refers to the current job. The previous job may be referenced using ‘%-’. If there is only a single job, ‘%+’ and ‘%-’ can both be used to refer to that job. In output pertaining to jobs (e.g., the output of the jobs command), the current job is always flagged with a ‘+’, and the previous job with a ‘-’.

In Bash's output when starting and stopping jobs,

[n]+ status

means "job %n (aka job %+) is now status".

ephemient