df命令的功能是用來檢查linux服務器的文件系統的磁盤空間佔用狀況。html
-a, --all include dummy file systems -B, --block-size=SIZE use SIZE-byte blocks --direct show statistics for a file instead of mount point --total produce a grand total -h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G) -H, --si likewise, but use powers of 1000 not 1024 -i, --inodes list inode information instead of block usage -k like --block-size=1K -l, --local limit listing to local file systems --no-sync do not invoke sync before getting usage info (default) -P, --portability use the POSIX output format --sync invoke sync before getting usage info -t, --type=TYPE limit listing to file systems of type TYPE -T, --print-type print file system type -x, --exclude-type=TYPE limit listing to file systems not of type TYPE -v (ignored)
顯示全部磁盤空間佔用狀況node
df -ha 【-a 顯示全部】
注意: tmpfs 是一個不存在於實體硬盤上、而是駐在記憶裏的特殊文件系統。其中一個反作用就是當你失去電源(或重就開機)時,tmpfs 上的一切內容都會消失。tmpfs 駐守在內存裏,它的速度極快。它的尋覓時間與駐守在硬盤上的通常文件系統根本不能相比。linux
mount -t tmpfs tempfilesystem /mnt/tmpfs 【手動掛載tmpfs文件系統】shell
以inode模式顯示磁盤使用狀況服務器
[root@localhost omc]# df -i
顯示指定類型磁盤spa
[root@localhost omc]# df -ht ext4
列出文件系統的類型【經常使用】orm
[root@localhost omc]# df -h