df :df 利用df呼吁查察linux磁盘剩余空间
[root]# df -hl
文件系统 容量 已用 可用 已用% 挂载点
/dev/hda5 487M 120M 342M 27% /
/dev/hda1 981M 21M 911M 3%
/boot none 125M 0 125M 0%
/dev/shm /dev/hda2 29G 4.9G 23G 18%
/home /dev/hda3 20G 4.8G 14G 27% /usr
/dev/hda7 24G 510M 22G 3% /var
/dev/hdb2 75G 75G 0 100% /
df是以磁盘分区为单元来查察文件系统。
/dev/hdb2 75G 75G 0 100% /, 以此为例。
暗示HD硬盘接口的第二个硬盘(b),第二个分区(2),容量是75G,用了75G,可用是0,因此操作率是100%, 被挂载到根分区目次上(/)
别的简朴的一个步伐就是鼠标右键查察磁盘、文件夹属性,就能相识到已用几多,剩余几多空间。在我本身的开拓板上利用的功效
du - estimate file space usage
SYNOPSIS
du [OPTION]... [FILE]...
DESCRIPTION
Summarize disk usage of each FILE, recursively for directories.
Mandatory arguments to long options are mandatory for short options too.
-a, --all
write counts for all files, not just directories
--apparent-size
print apparent sizes, rather than disk usage; although the apparent size is usually smaller, it may be
larger due to holes in (âsparseâ) files, internal fragmentation, indirect blocks, and the like
-B, --block-size=SIZE use SIZE-byte blocks
-b, --bytes
equivalent to â--apparent-size --block-size=1â
-H like --si, but also evokes a warning; will soon change to be equivalent to --dereference-args (-D)
-h, --human-readable
print sizes in human readable format (e.g., 1K 234M 2G)
--si like -h, but use powers of 1000 not 1024
-k like --block-size=1K
-l, --count-links
count sizes many times if hard linked
-L, --dereference
dereference all symbolic links
-P, --no-dereference
donât follow any symbolic links (this is the default)
-0, --null
end each output line with 0 byte rather than newline
-S, --separate-dirs
do not include size of subdirectories
-s, --summarize
display only a total for each argument
-x, --one-file-system
skip directories on different filesystems
-X FILE, --exclude-from=FILE
Exclude files that match any pattern in FILE.
判定一个文件夹多大: