Centos下,磁盘被占用严重,这是我们最需要的就是查看一下是哪些文件占用磁盘过大
可以使用du命令查询大文件并进行排序。
du -s /var/log/* | sort -nr
注释:
-s 对每个Names参数只给出占用的数据块总数
-sort 排序命令
-nr 按算术值对字段排序
也可以用find,查找大于200M的文件并显示详细信息
find . -size +100000000c -exec ls -lh {} ;
ppt.cc/fVjECx ppt.cc/fEnHsx ppt.cc/fRZTnx ppt.cc/fSZ3cx ppt.cc/fLOuCx ppt.cc/fE9Nux ppt.cc/fL5Kyx ppt.cc/fIr1ax ppt.cc/f71Yqx tecmint.com linuxcool.com linux.die.net linux.it.net.cn ostechnix.com unix.com ubuntugeek.com runoob.com man.linuxde.net ppt.cc/fwpCex ppt.cc/fxcLIx ppt.cc/foX6Ux linuxprobe.com linuxtechi.com howtoforge.com linuxstory.org systutorials.com ghacks.net linuxopsys.com ppt.cc/ffAGfx ppt.cc/fJbezx ppt.cc/fNIQDx ppt.cc/fCSllx ppt.cc/fybDVx ppt.cc/fIMQxx ppt.cc/fKlBax
du -s /var/log/* | sort -nr
find . -size +100000000c -exec ls -lh {} ;