Bird
0
0

You mistakenly run tail -f /var/log/app.log & but the command stops showing output after a while. What could be wrong?

medium📝 Troubleshoot Q7 of 15
Linux CLI - Viewing and Editing Files
You mistakenly run tail -f /var/log/app.log & but the command stops showing output after a while. What could be wrong?
AThe <code>-f</code> option is invalid in background
BThe file is locked and cannot be read
CThe command requires a full path to <code>tail</code>
DThe command is running in background without terminal output; use <code>fg</code> to bring it back
Step-by-Step Solution
Solution:
  1. Step 1: Understand background process behavior

    Running with & sends the process to background, so output may not appear on terminal.
  2. Step 2: How to fix output visibility

    Use fg to bring the process to foreground to see live output.
  3. Final Answer:

    The command is running in background without terminal output; use fg to bring it back -> Option D
  4. Quick Check:

    Background jobs hide output; use fg [OK]
Quick Trick: Foreground jobs show output; background jobs may hide it [OK]
Common Mistakes:
  • Thinking -f is invalid in background
  • Assuming file lock causes no output
  • Believing full path is mandatory

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes