[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #26885] -size checks filesize, not blocks-used-in-filesystem.

From: Roger Wolff
Subject: [bug #26885] -size checks filesize, not blocks-used-in-filesystem.
Date: Thu, 25 Jun 2009 15:25:12 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20081202 Iceweasel/ (Debian-


                 Summary: -size checks filesize, not
                 Project: findutils
            Submitted by: rewolff
            Submitted on: Thu 25 Jun 2009 03:25:08 PM GMT
                Category: find
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.2.28
           Fixed Release: None



It is useful to search for files that take a lot of disk space. I happen to
have a lot of files that are 1Gbyte large, but occupy only their inode: they
are completely zero. 

I have a cronjob that tries to compress such files. however, compressing
those files that only contain zeroes takes a lot of CPU time, and only
increases the disk usage.

The attached patch implements the -space predicate that checks (like -size)
the size-on-disk instead of the file length.

I'm a technical guy, so I built the patch, but haven't update the docs. Just
drop me a note if you are going to incorporate this and want me to write the

The patch shortens the sourcecode by about 30 lines of code. 


File Attachments:

Date: Thu 25 Jun 2009 03:25:08 PM GMT  Name: space_patch.diff  Size: 7kB  
By: rewolff



Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]