Bird
0
0

What will be the output of the command sequence below?

medium📝 Command Output Q13 of 15
Linux CLI - Process Management
What will be the output of the command sequence below?
sleep 100 &
jobs
kill -STOP %1
jobs
AShows the job stopped both times
BShows no jobs running
CShows the job running, then shows it stopped
DShows an error because kill -STOP is invalid
Step-by-Step Solution
Solution:
  1. Step 1: Understand the commands

    sleep 100 & runs sleep in background; jobs lists jobs; kill -STOP %1 pauses job 1.
  2. Step 2: Predict jobs output

    First jobs shows sleep running; after kill -STOP, jobs shows it stopped.
  3. Final Answer:

    Shows the job running, then shows it stopped -> Option C
  4. Quick Check:

    jobs before and after kill -STOP = running then stopped [OK]
Quick Trick: jobs shows status; kill -STOP pauses job [OK]
Common Mistakes:
  • Thinking kill -STOP kills the job
  • Expecting no jobs after sleep &
  • Believing kill -STOP is invalid

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes