现在的位置: 首页 > 综合 > 正文

Linux命令:free & df & du !

2013年04月06日 ⁄ 综合 ⁄ 共 1018字 ⁄ 字号 评论关闭

free:查看内存使用情况。
-m:显示的单位是以MB来显示。

-t:在输出的最终结果中显示物理内存与swap的总量。

[root@db ~]# free -m
             total       used       free     shared    buffers     cached
Mem:           503        195        307          0         13        149
-/+ buffers/cache:         33        469
Swap:         1027          0       1027

[root@db ~]# free -mt
             total       used       free     shared    buffers     cached
Mem:           503        195        307          0         13        149
-/+ buffers/cache:         33        469
Swap:         1027          0       1027
Total:        1530        195       1335

说明:
Mem:物理内存。
Swap:虚拟内存。
total:总量。
used:已经使用的量。
free:剩余可用的量。
shared:共享内存。
buffers:用于缓冲存储器。
cache:用于高速缓存。
-------------------------------------------------------------------------
df:列出文件系统的整体磁盘使用量。

[root@linux ~]# df -h
文件系统              容量  已用 可用 已用% 挂载点
/dev/sda3              19G   11G  6.6G  63% /
/dev/sda1              99M   12M   83M  12% /boot
tmpfs                 252M     0  252M   0% /dev/shm

-------------------------------------------------------------------------
du:评估文件系统的磁盘使用量(常用于评估目录所占容量)。

[root@linux oracle]# du -hs flash_recovery_area/
392M    flash_recovery_area/
[root@linux oracle]# du -h flash_recovery_area/
4.0K    flash_recovery_area/ORCL/onlinelog
294M    flash_recovery_area/ORCL/archivelog/2011_11_18
98M     flash_recovery_area/ORCL/archivelog/2011_11_19
392M    flash_recovery_area/ORCL/archivelog
392M    flash_recovery_area/ORCL
392M    flash_recovery_area/

抱歉!评论已关闭.