English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The Linux df command (English full name: disk free) is used to display the statistics of file system disk usage on the current Linux system.
df [options]... [FILE]...
Visualizza le statistiche di utilizzo del disco del file system:
# df Filesystem 1K-blocks Utilizzato Disponibile Utilizzo% Montato su /dev/sda6 29640780 4320704 23814388 16% / udev 1536756 4 1536752 1% /dev tmpfs 617620 888 616732 1% /run nessuno 5120 0 5120 0% /run/lock nessuno 1544044 156 1543888 1% /run/shm
La prima colonna specifica il nome del file system, la seconda colonna specifica un file system specifico 1K-blocks, 1K è l'unità di memoria totale in byte. Le colonne di utilizzo e disponibile specificano rispettivamente la quantità di memoria utilizzata.
L'ultima colonna specifica la percentuale di memoria utilizzata, mentre l'ultima colonna "installato in" specifica il punto di mount del file system.
df può anche mostrare le informazioni sul file system utilizzato dal disco:
# df test Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda6 29640780 4320600 23814492 16% /
L'output del comando df con l'opzione -i mostra le informazioni sugli inode invece della quantità di blocco utilizzata.
df -i Filesystem Inodes IUsed IFree IUse% Mounted on /dev/sda6 1884160 261964 1622196 14% / udev 212748 560 212188 1% /dev tmpfs 216392 477 215915 1% /run nessuno 216392 3 216389 1% /run/lock nessuno 216392 8 216384 1% /run/shm
Mostra tutte le informazioni:
# df --total Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda6 29640780 4320720 23814372 16% / udev 1536756 4 1536752 1% /dev tmpfs 617620 892 616728 1% /run nessuno 5120 0 5120 0% /run/lock none 1544044 156 1543888 1% /run/shm 总计 33344320 4321772 27516860 14%
我们看到输出的末尾,包含一个额外的行,显示每一列的总计。
-h选项,通过它可以产生可读的格式df命令的输出:
# df -h 文件系统 大小 已用 可用 使用% 挂载于 /dev/sda6 29G 4.2G 23G 16% / udev 1.5G 4.0K 1.5G 1% /dev tmpfs 604M 892K 603M 1% /run none 5.0M 0 5.0M 0% /run/lock none 1.5G 156K 1.5G 1% /run/shm
我们可以看到输出显示的数字形式的'G'(千兆字节),"M"(兆字节)和"K"(千字节)。
这使得输出易于阅读和理解,从而使显示可读。请注意,第二列的名称也发生了变化,为了使显示可读的“大小”。