System Administration Guide: Advanced Administration

How to Find Files That Exceed a Specified Size Limit

To locate and display the names of files that exceed a specified size, use the find command.


$ find directory -size +nnn 

directory

Identifies the directory you want to search. 

-size +nnn

Is a number of 512-byte blocks. Files that exceed this size are listed. 

Example—Finding Files That Exceed a Specified Size Limit

The following example shows how to find files larger than 400 blocks in the current working directory.


$ find . -size +400 -print
./Howto/howto.doc
./Howto/howto.doc.backup
./Howto/howtotest.doc
./Routine/routineBackupconcepts.doc
./Routine/routineIntro.doc
./Routine/routineTroublefsck.doc
./.record
./Mail/pagination
./Config/configPrintadmin.doc
./Config/configPrintsetup.doc
./Config/configMailappx.doc
./Config/configMailconcepts.doc
./snapshot.rs