URL: <http://savannah.gnu.org/bugs/?26885>
Summary: -size checks filesize, not blocks-used-in-filesystem. 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 _______________________________________________________ Details: 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 documentation. 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 <http://savannah.gnu.org/bugs/download.php?file_id=18317> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?26885> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/