centos下查看磁盘使用空间:

centos下查看磁盘使用空间

1.df命令:

NAME
       df - report file system disk space usage

DESCRIPTION
       This  manual page documents the GNU version of df.  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, unless the  environment  variable  POSIXLY_CORRECT  is
       set, in which case 512-byte blocks are used.

       If an argument is the absolute file name of a disk device node containing a mounted file
       system, df shows the space available on that file system rather than on the file  system
       containing  the  device node (which is always the root file system).  This version of df
       cannot show the space available on unmounted file systems, because on most kinds of systems doing so requires very nonportable intimate knowledge of file system structures.   

2.查看硬盘的分区fdisk
3.查看每个文件的占用空间:du
4.查看被进程打开的文件:lsof【list open files】根本目的是为了系统级的监控、诊断工具。

猜你喜欢

转载自blog.csdn.net/liu16659/article/details/81189421