Home >Operation and Maintenance >Linux Operation and Maintenance >How to query disk in linux
In Linux, you can use the df command to query the disk. The function of this command is to display the file system disk usage statistics on the Linux system. When the parameter is set to "-h", the disk display format is easy Yes, the syntax is "df -h".
#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
The Linux df (full English spelling: disk free) command is used to display the current file system disk usage statistics on the Linux system.
Syntax
df [选项]... [FILE]...
File-a, --all Contains all file systems with 0 Blocks
File- -block-size={SIZE} Use {SIZE} size Blocks
file -h, --human-readable Use human-readable format (default value is not to add this Options...)
File -H, --si is like -h, but uses 1000 instead of 1024
File -i, --inodes List inode information, do not list used blocks
File -k, --kilobytes Just like --block-size=1024
File -l, --local Limit the listed file structures
File -m, --megabytes Like --block-size= 1048576
File--no-sync Do not sync before getting information (default value)
File-P, --portability use POSIX Output format
file--sync sync
file-t, --type=TYPE limit the list of file systems before obtaining information TYPE
File-T, --print-type Display the format of the file system
File-x, --exclude-type=TYPE Restrict listing of file systems to do not show TYPE
file -v (ignore)
# df Filesystem 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/shmThe first column specifies the name of the file system, the second column specifies a specific file system 1K - blocks 1K is 1024 bytes of total memory. The used and available columns are in use, respectively, specifying the amount of memory. Use columns to specify the percentage of memory used, while the last column "mounted on" specifies the mount point of the file system. df can also display the file system information used by the disk:
# df test Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda6 29640780 4320600 23814492 16% /Related recommendations: "
Linux Video Tutorial"
The above is the detailed content of How to query disk in linux. For more information, please follow other related articles on the PHP Chinese website!