Warning: Creating default object from empty value in /home/customer/www/gavinsoorma.com/public_html/wp-content/themes/specular/admin/inc/class.redux_filesystem.php on line 29
How to find files based on size in Unix | Oracle DBA – Tips and Techniques
News
Perth, Australia
+ (61) 417713124
prosolutions@gavinsoorma.com

2 Comments

vinay
  • Jul 15 2009
Hi, nice post what is the relation between 100 and +200000 ?? If i have to do for 10mb what is the size number ? Thx
Gavin Soorma
  • Jul 15 2009
Hi Vinay - it is based on the Unix block size - in this AIX machine (as in most other cases as well) it is 512 bytes so the command below will list all files > 10 KB using the +20 flag in the 'size' command testdb:/u01/oracle/scripts> find . -size +20 -exec ls -l {} \; -rw-r----- 1 oracle dba 57344 Sep 9 2004 ./20040910/exp_prospector_schema_gnu1a.exp -rw-r----- 1 oracle dba 10713771 Sep 10 2004 ./20040910/exp_prospector_schema_gnu1a_rowsY.exp.Z -rw-r----- 1 oracle dba 16826 Sep 20 2004 ./20040920/edify_userprofile_20040920.dmp.Z -rw-r----- 1 oracle dba 102400 Sep 24 2004 ./20040924/test.imp -rw-r----- 1 oracle dba 106496 Feb 2 2006 ./cr19625_20060202/edify_userprofile.dmp -rw-r----- 1 oracle dba 71016 Jul 8 2008 ./p5632264_10203_AIX64-5L.zip -rw-r--r-- 1 oracle dba 283359 Aug 18 2008 ./tutorial.sql testdb:/u01/oracle/scripts> This command will list files > 10 MB testdb:/u01/oracle/scripts> find . -size +2000 -exec ls -l {} \; -rw-r----- 1 oracle dba 10713771 Sep 10 2004 ./20040910/exp_prospector_schema_gnu1a_rowsY.exp.Z

Leave Reply

Your email address will not be published. Required fields are marked *