I cannot find the answer anywhere. When i have several jobs that are in the background and i list them with jobs i get the following:
[1] Stopped command1
[2] Stopped command2
[3]- Stopped command3
[4]+ Stopped command4
The plus sign is always on the last one, and the minus is on the second to last. What do these things mean?
They'll always be the latest and latest-minus-one running jobs.
Their only purpose, as far as I can tell, is to provide a shorthand for those two latest jobs so you can reference them as
fg -
instead offg %3
. This makes it fairly trivial to spin between two or three processes.TLDP seems to corroborate this (see Table 15-1. Job identifiers)