Free CompTIA Linux+ XK0-005 Practice Question

A system administrator is writing a shell script that periodically checks the disk space usage on a Linux server. To ensure that the output of the disk check does not flood the terminal or logs when running the script via a cron job, the administrator wants to discard the standard output. Which command redirection to /dev/null achieves this purpose?

  • df -h 2> /dev/null

  • df -h | /dev/null

  • df -h &> /dev/null

  • df -h > /dev/null

This question's topic:
CompTIA Linux+ XK0-005 / 
System Management
Your Score:

Check or uncheck an objective to set which questions you will receive.

SAVE $45
Bash, the Crucial Exams Chat Bot
AI Bot