English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The Linux df command (English full name: disk free) is used to display the disk usage statistics of the file system on the current Linux system.
df [options]... [FILE]...
Display the disk usage statistics of the file system:
# df Sistema de archivos 1K-blocks Used Available Use% Mounted on /dev/sda6 29640780 4320704 23814388 16% / udev 1536756 4 1536752 1% /dev tmpfs 617620 888 616732 1% /run none 5120 0 5120 0% /run/lock none 1544044 156 1543888 1% /run/shm
The first column specifies the name of the file system, and the second column specifies a specific file system1K-block1K is1024Total memory in bytes. The columns "used" and "available" specify the amount of memory used, respectively.
Use the column to specify the percentage of memory used, while the last column "mounted on" specifies the mount point of the file system.
df también puede mostrar información del sistema de archivos utilizado para el uso del disco:
# df test Sistema de archivos 1K-bloques Usado Disponible Usado% Montado en /dev/sda6 29640780 4320600 23814492 16% /
Con una-La salida del comando df con la opción i muestra información de inodos en lugar de uso de bloques.
df -i Sistema de archivos Inodos IUsado ILibre IUsado% Montado en /dev/sda6 1884160 261964 1622196 14% / udev 212748 560 212188 1% /dev tmpfs 216392 477 215915 1% /run none 216392 3 216389 1% /run/lock none 216392 8 216384 1% /run/shm
Muestra toda la información:
# df --total Sistema de archivos 1K-bloques Usado Disponible Usado% Montado en /dev/sda6 29640780 4320720 23814372 16% / udev 1536756 4 1536752 1% /dev tmpfs 617620 892 616728 1% /run none 5120 0 5120 0% /run/lock none 1544044 156 1543888 1% /run/shm total 33344320 4321772 27516860 14%
Vemos que al final de la salida, hay una línea adicional que muestra el total de cada columna.
-La opción h, a través de la cual se puede generar una salida legible del comando df:
# df -h Sistema de archivos Tamaño Usado Disponible Usado% Montado en /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
Podemos ver que la salida muestra los números en forma de 'G' (gigabytes), "M" (megabytes) y "K" (kilobytes).
Esto hace que la salida sea fácil de leer y entender, haciendo que la visualización sea legible. Nota que también ha cambiado el nombre de la segunda columna, para que la visualización sea legible "tamaño".