System Administration Guide: Advanced Administration

ProcedureHow to Find Files That Exceed a Specified Size Limit

  1. 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 that you want to search.

    -size +nnn

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


Example 6–7 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. The -print option displays the output of the find command.


$ 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