(Bash) `jobs` options
- Adding
-lflag also prints out the PID of each job in addition to job ID, which may be handy for e.g. subsequentkill -9. Specifying-pinstead ONLY prints out the PIDs. - Adding
-sflag letsjobsonly print out the stopped jobs, e.g. below kills all stopped jobs:sudo kill -9 `jobs -p -s`The opposite is
-rwhich prints out only the running jobs.
References:
Written on October 19, 2021
