查找oracle占用大文件并删除


1、找 用du -lh /u01/app/ -d 2 |sort -hr|head -n 10 

找出前是个占用空间最大的文件夹,可以调整 -d(--max-depth=number) 2来查看

逐步调整--max-depth=n 来查看

2、用find 找出并执行 

find /u01/app/oracle/arch -size +200m -type f -exec rm -rf {}\;

高级用法:find /u01 -size +1G -TYPE d | xargs du -sh|sort -hr