Linux磁盘工具

1、df - report file system disk space usage

df displays the amount of disk space available on the file system containing each file name argument.  If no file name is given, the space available on all currently mounted file systems  is  shown.   Disk  space  is shown in 1K blocks by default.

</tmp/takchi>$df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
					  9.9G  3.6G  5.9G  38% /
tmpfs                  32G     0   32G   0% /dev/shm
/dev/sda1            1008M   60M  897M   7% /boot
/dev/mapper/VolGroup-lv_home
					  5.0G  2.3G  2.5G  48% /home
/dev/mapper/VolGroup-lv_opt
					   60G   49G  7.8G  87% /opt
/dev/mapper/VolGroup-lv_srv_BigData
					  9.9G  2.4G  7.0G  26% /srv/BigData
/dev/mapper/VolGroup-lv_tmp
					  5.0G  168M  4.6G   4% /tmp
/dev/mapper/VolGroup-lv_var
					  9.9G  2.7G  6.7G  29% /var
/dev/mapper/VolGroup-lv_var_crash
					  9.9G  8.1G  1.3G  87% /var/crash
/dev/mapper/VolGroup-lv_var_log
					   30G  4.1G   24G  15% /var/log
/dev/sdb1             591G  366G  225G  62% /srv/BigData/hadoop/data1


2、du - estimate file space usage
Summarize disk usage of each FILE, recursively for directories.

</tmp/takchi>$du -ah
8.0K	./gray_20170213000000.txt
16K	./hello
4.0K	./hello.cpp
28K	./world
4.0K	./world.cpp
64K	.

3、fdisk - Partition table manipulator for Linux

Hard  disks  can be divided into one or more logical disks called partitions.  This division is described in the partition table found
in sector 0 of the disk.

猜你喜欢

转载自blog.csdn.net/i792439187/article/details/55212379