[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:1.8.1.19) Gecko/20081202 Iceweasel/2.0.0.19 (Debian-2.0.0.19-0etch1) |
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/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #26885] -size checks filesize, not blocks-used-in-filesystem.,
Roger Wolff <=