Linux下查看目录大小
sudo du -s * | sort -nr | head 显示前10个占用空间最大的文件或目录 sudo du --max-depth=1 linux查找占空间最大的文件与目录 sudo find / -size +204800 这样可以查找出大于100M的文件,按需求删除就可 sudo find ./ -size +2048c 查找大于2K的文件,+ 表示大于 sudo find ./ -size +2048c -type f 查找小于2K的文件,- 表示小于
demo
[root@gtone ~]# find / -size +204800 /softs/apginstall.bin /proc/kcore find: /proc/3643/task/3643/fd/4: No such file or directory find: /proc/3643/task/3643/fdinfo/4: No such file or directory find: /proc/3643/fd/4: No such file or directory find: /proc/3643/fdinfo/4: No such file or directory /u01/app/oracle/oradata/ORCL/AppGov_oradata_01.dbf /u01/app/oracle/oradata/ORCL/example01.dbf /u01/app/oracle/oradata/ORCL/sysaux01.dbf /u01/app/oracle/oradata/ORCL/temp01.dbf /u01/app/oracle/oradata/ORCL/system01.dbf /u01/app/oracle/oradata/ORCL/undotbs01.dbf /u01/app/oracle/product/11.2.0/db_1/lib/libserver11.a /u01/app/oracle/product/11.2.0/db_1/assistants/dbca/templates/Seed_Database.dfb /u01/app/oracle/product/11.2.0/db_1/bin/oracle /u01/app/oracle/product/11.2.0/db_1/javavm/admin/classes.bin /home/oracle/dmp_dir/20141001_CQBANK_BAK.dmp /home/oracle/dmp_dir/local_true.dmp /home/gtone/AppGov/analyzer/server/CE/nohup.out.bak /home/gtone/AppGov/analyzer/log/20140930/20140930000042.log /home/gtone/AppGov/analyzer/log/20141001/20141001000063.log /home/gtone/AppGov/itpweb/log/jwizard.log.2014-09-26 /home/gtone/code/source.zip /home/gtone/code/AppGov.zip /home/gtone/code/precise_960_GA.zip [root@gtone ~]#