Online Linux Terminal Logo
OnlineLinuxTerminal
Диск и памятьCLI Manual

$du

Estimate file and directory space usage.

Синтаксис командыPOSIX Standard
du [OPTIONS] [FILE...]
Сообщество Linux2.4k Онлайн

Общайтесь с пользователями Linux, учите команды и скачивайте шпаргалки.

Попробуйте в интерактивной песочнице

Клиентская симуляция без установки с мгновенным результатом.

Открыть в полноэкранном терминале ↗
bash — terminal

Обзор и принцип работы

`du` (Disk Usage) measures the space occupied by individual files and folders on disk. Unlike `df` which inspects entire partitions, `du` recursively scans directories to identify which folders or log files are consuming disk space.

Основные флаги и параметры команды

Flag / OptionDescription
-s, --summarizeDisplay only a total sum for each specified directory argument.
-h, --human-readablePrint sizes in human readable format (e.g., 24K, 500M, 4G).
-d, --max-depth=NPrint total for a directory only if it is N or fewer levels below.

Практические примеры использования

#1Check folder size summary
du -sh /var/log

Outputs the total human-readable size of the /var/log directory.