Merry Christmas & Happy 2027! Less downtime. More good times. Celebrating 13 years of sorlavit.com
Skip to content
Sorlavit KimIT Support, Network & Infrastructure Services Let’s talk

ปุ่มแปลไทยจะเปิดบทความผ่าน Google Translate เพื่อแปลอัตโนมัติ โดยคงโค้ดและคำสั่งไว้ตามต้นฉบับ

Linux Commands / IT Support Guides

Find growing directories with du

After identifying a full filesystem, locate the directories consuming its space. Keep the scan on the relevant mount to avoid including unrelated attached storage.

Compiled for Sorlavit Kim · Published · Updated · 1 min read

Environment and inputs: Linux · Bash-compatible shell; package and service names vary by distribution

Try the diagnostic command

Use the stated shell and platform. Replace sample domains, addresses, services and paths with values from the system you are authorized to support.

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

How to read the result

The GNU du example totals usage one level below the selected directory. -x stays on one filesystem, while -h prints human-readable sizes.

What to do next

Replace the root with the affected application subtree and drill down into the largest relevant directory. Confirm file ownership and retention rules before proposing a cleanup.

Before you make a change

A scan can create substantial I/O on a busy server. Permission failures or deleted-but-open files can explain differences between du and df.

Source & further reading

GNU Coreutils — du invocation

Independently written summary reviewed on 2026-11-01. The example illustrates a possible application; it is not a client case study.

Share this article

Back to all articles