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 | /dev/null
df -h > /dev/null
df -h &> /dev/null
df -h 2> /dev/null