Диск и памятьCLI Manual
$du
Estimate file and directory space usage.
Синтаксис командыPOSIX Standard
du [OPTIONS] [FILE...]Попробуйте в интерактивной песочнице
Клиентская симуляция без установки с мгновенным результатом.
bash — terminal
AST Sandbox (Free)
Обзор и принцип работы
`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 / Option | Description |
|---|---|
| -s, --summarize | Display only a total sum for each specified directory argument. |
| -h, --human-readable | Print sizes in human readable format (e.g., 24K, 500M, 4G). |
| -d, --max-depth=N | Print total for a directory only if it is N or fewer levels below. |
Практические примеры использования
#1Check folder size summary
du -sh /var/logOutputs the total human-readable size of the /var/log directory.
Похожие команды Linux
$findОперации с файлами
Поиск файлов и директорий в иерархии каталогов по имени, типу, размеру или дате изменения.
$lsНавигация
Отображение содержимого каталогов с метаданными, правами и размерами файлов.
$dfДиск и память
Report file system disk space usage across mounted storage partitions.
$freeДиск и память
Display total amount of free and used physical memory and swap.