Courseiva
GNU and Unix Commands →mediumMultiple Choice

LPIC-1 GNU and Unix Commands Practice Question

A junior administrator is monitoring a long-running data migration and wants the 'df -h' output for the /data mount point to refresh automatically on screen every 5 seconds, replacing the previous output each time. Which command accomplishes this?

⚠ Common exam trap

The trap here is assuming that backgrounding a command with an ampersand or using sleep creates a repeating refresh, when only a true loop or watch redraws output.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

watch -n 5 df -h /data

The watch command is purpose-built for periodically re-running a program and overwriting the terminal display with its newest output. Supplying -n 5 sets the refresh interval to five seconds, and appending the df invocation with the /data path limits monitoring to that mount point. This satisfies the need for hands-free, continuously updated usage information.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    watch -n 5 df -h /data

    Why this is correct

    The watch utility repeatedly executes the given command and redraws the terminal with the latest output, clearing the screen between runs. The -n 5 flag sets a 5-second interval, so the /data usage refreshes in place. This matches the requirement of an automatic, self-replacing display without manual re-invocation.

  • ✗

    nohup df -h /data &

    Why it's wrong here

    nohup detaches a process from the controlling terminal and the ampersand backgrounds it, so the command runs once and its output is redirected away from the screen. Nothing is refreshed periodically, and the administrator would not see live updates. It is designed for surviving logout, not for repeated on-screen monitoring.

  • ✗

    at now + 5 minutes -f df -h /data

    Why it's wrong here

    at schedules a command for a future one-time execution via the atd daemon; it does not repeat or display output interactively. The syntax shown is also invalid because at expects a script file, not an inline command with arguments. It cannot produce a five-second refreshing display.

  • ✗

    sleep 5 && df -h /data

    Why it's wrong here

    This waits five seconds, then runs df exactly once. There is no loop and no screen refresh, so after the single print the output is static. It does not satisfy the requirement of periodic automatic re-display of the /data usage statistics.

About these practice questions

Courseiva writes every LPIC-1 question from scratch — 402 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official LPI exam blueprint

This LPIC-1 practice question is part of Courseiva's free LPI certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LPIC-1 exam.