CloudsArk
Commands Linux

du Interview Questions and Answers

Review common du interview questions with practical answers and command examples.

du Interview Questions and Answers

Introduction

These questions test whether you understand what du does, when to use it, and how to verify the result on Linux.

Beginner Questions

What does du do?

It estimates file and directory disk usage.

Show a basic command.

du -sh /var/log

Intermediate Questions

Name useful options.

  • -s: summarize total only.
  • -h: show human-readable sizes.
  • --max-depth: limit directory depth.

Show a common administrator command.

du -h --max-depth=1 /var

Scenario-Based Questions

How would you handle du -sh?

du -sh /var/log

What would you verify afterward?

df -h /var

Expected output should look similar to:

1.4G    /var/log

Practical Task Questions

Practice in a lab by running a safe version of the command, explaining the target, and showing the verification output.

Quick Review

du -sh /var/log
du -h --max-depth=1 /var
df -h /var

Summary

A strong du answer includes the purpose, a correct example, a common mistake, and a verification command with output you can interpret.