您的位置:首页 > 运维架构 > Linux

linux 下查看磁盘空间的使用量

2013-07-26 19:09 225 查看
查看linux系统挂载目录的容量使用如下命令:

[root@localhost ~]# df -h
文件系统 容量 已用 可用 已用% 挂载点
/dev/sda2 14G 11G 2.6G 82% /
/dev/sda1 99M 14M 81M 14% /boot
tmpfs 442M 275M 168M 63% /dev/shm
/dev/mapper/vg_test-lv_test
24M 1.3M 21M 6% /mnt/lvm

查看当前的文件夹下的磁盘使用情况:
[root@localhost ~]# du --max-depth=1 -h
24K ./.gnome www.2cto.com
8.0K ./.eggcups
8.0K ./.config
136K ./.gnome2
16K ./.chewing
8.0K ./.gnome2_private
8.0K ./.Trash

查看指定路径的大小:
[root@localhost ~]# du -sh /opt/oracle
5.6G /opt/oracle
[root@localhost ~]#

如果磁盘过大,那么查看文件大小就比较忙,请等一会,呵呵
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: