Which commands verify disk space usage and identify directories consuming the most space?

Prepare for the Red Hat Certified Systems Admin Exam EX200. Enhance your skills with interactive quizzes, flashcards, and detailed explanations. Ace your certification exam today!

Multiple Choice

Which commands verify disk space usage and identify directories consuming the most space?

Explanation:
To quickly see where space is going, you first check the overall filesystem usage and then drill into what’s actually consuming that space. The df command in human-readable mode shows, at a glance, how much space is used and free on each mounted filesystem, so you know if you’re running low on disk overall. To identify the biggest space users, you list disk usage with du in a recursive, human-friendly format starting at the root, which reveals how much space each file and directory is taking. Piping that output into a sort that orders by size in descending order lets you see the largest items first, and limiting the result with head gives you a concise top-N list you can act on quickly. This combination thus fulfills both goals: confirming current space status and pinpointing the largest space consumers to investigate further.

To quickly see where space is going, you first check the overall filesystem usage and then drill into what’s actually consuming that space. The df command in human-readable mode shows, at a glance, how much space is used and free on each mounted filesystem, so you know if you’re running low on disk overall.

To identify the biggest space users, you list disk usage with du in a recursive, human-friendly format starting at the root, which reveals how much space each file and directory is taking. Piping that output into a sort that orders by size in descending order lets you see the largest items first, and limiting the result with head gives you a concise top-N list you can act on quickly. This combination thus fulfills both goals: confirming current space status and pinpointing the largest space consumers to investigate further.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy