Debian Bug report logs - #208307
Bug#208307: Documentation for '-printf %k' insufficient

version graph

Package: findutils; Maintainer for findutils is Andreas Metzler <ametzler@debian.org>; Source for findutils is src:findutils (PTS, buildd, popcon).

Reported by: Christian Fughe <c.m.fughe@wtb.tue.nl>

Date: Tue, 2 Sep 2003 01:03:03 UTC

Severity: minor

Tags: fixed-upstream

Found in version 4.1.20-1

Fixed in version findutils/4.2.22-1

Done: Andreas Metzler <ametzler@debian.org>

Bug is archived. No further changes may be made.

Forwarded to bug-findutils@gnu.org

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Andreas Metzler <ametzler@debian.org>:
Bug#208307; Package findutils. (full text, mbox, link).


Acknowledgement sent to Christian Fughe <c.m.fughe@wtb.tue.nl>:
New Bug report received and forwarded. Copy sent to Andreas Metzler <ametzler@debian.org>. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Christian Fughe <C.M.Fughe@wtb.tue.nl>
To: submit@bugs.debian.org
Subject: option '-printf %k' returns wrong values
Date: Tue, 2 Sep 2003 02:48:05 +0200 (CEST)
Package: findutils
Version: 4.1.20-1

The file 'test.txt' has 4834221 bytes.

'find -name text.txt -printf %k' returns

4736

while I do expect:

4720.91 = 4834221/1024



Debian _Sid_ from 23 Aug. 2003

kernel  2.4.21
libc6   2.3.2-4


Regards,

        Christian






Severity set to `minor'. Request was from Andreas Metzler <ametzler@downhill.at.eu.org> to control@bugs.debian.org. (full text, mbox, link).


Changed Bug title. Request was from Andreas Metzler <ametzler@downhill.at.eu.org> to control@bugs.debian.org. (full text, mbox, link).


Message sent on to Christian Fughe <c.m.fughe@wtb.tue.nl>:
Bug#208307. (full text, mbox, link).


Message #12 received at 208307-submitter@bugs.debian.org (full text, mbox, reply):

From: Andreas Metzler <ametzler@downhill.at.eu.org>
To: 208307-submitter@bugs.debian.org
Subject: Re: Bug#208307: option '-printf %k' returns wrong values
Date: Tue, 2 Sep 2003 11:58:49 +0200
severity 208307 minor
retitle 208307 Bug#208307: Documentation for '-printf %k' insufficient
thank
On Tue, Sep 02, 2003 at 02:48:05AM +0200, Christian Fughe wrote:
> Package: findutils
> Version: 4.1.20-1
> 
> The file 'test.txt' has 4834221 bytes.
> 
> 'find -name text.txt -printf %k' returns
> 
> 4736
> 
> while I do expect:
> 
> 4720.91 = 4834221/1024
[...]

Hello,
It is not that simple.

Find prints how much space the file actually takes up on the disk
(st_blocks from stat(2)).

If you used an ext3 filesystem with a blocksize of 4096 bytes, a file
with a size of 5k will take up two blocks of 4096 bytes and find will
correctly report that it uses 8k on -printf %k.[1]

I agree that find's (info) documentation

|  %k     File's size in 1K blocks (rounded up).
|  %s     File's size in bytes.

is too short and fails to convey this difference. I will forward this
to upstream and ask them to use e.g. the corresponding entry of ls's
info-docs for -s in find's info.
|      Print the disk allocation of each file to the left of the file
|      name.  This is the amount of disk space used by the file, which is
|      usually a bit more than the file's size, but it can be less if the
|      file has holes.

           thanks, cu andreas
[1] This simple correlation does not hold for bigger files on ext3,
an 400k file will use 101 blocks, it will hold e.g. on reiserfs,
though.



Noted your statement that Bug has been forwarded to bug-findutils@gnu.org. Request was from Andreas Metzler <ametzler@downhill.at.eu.org> to control@bugs.debian.org. (full text, mbox, link).


Message sent on to Christian Fughe <c.m.fughe@wtb.tue.nl>:
Bug#208307. (full text, mbox, link).


Message #17 received at 208307-submitter@bugs.debian.org (full text, mbox, reply):

From: Andreas Metzler <ametzler@downhill.at.eu.org>
To: 208307-submitter@bugs.debian.org
Subject: Re: Bug#208307: option '-printf %k' returns wrong values
Date: Tue, 2 Sep 2003 13:52:48 +0200
forwarded 208307 bug-findutils@gnu.org
thank
On Tue, Sep 02, 2003 at 11:58:49AM +0200, Andreas Metzler wrote:
[...] 
> I agree that find's (info) documentation
> 
> |  %k     File's size in 1K blocks (rounded up).
> |  %s     File's size in bytes.
> 
> is too short and fails to convey this difference. I will forward this
> to upstream and ask them to use e.g. the corresponding entry of ls's
> info-docs for -s in find's info.

[o] Done.
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=5034&group_id=61
             cu andreas



Message sent on to Christian Fughe <c.m.fughe@wtb.tue.nl>:
Bug#208307. (full text, mbox, link).


Message #20 received at 208307-submitter@bugs.debian.org (full text, mbox, reply):

From: James Youngman <jay@gnu.org>
To: 208307-submitter@bugs.debian.org
Subject: fixed upstream
Date: Sat, 3 Jan 2004 21:30:21 +0000
Thsi si now fixed in the upstream CVS code
-- 
James Youngman.
CSSC Bug reporting page:       http://sf.net/tracker/?group_id=8064&atid=108064
GNU Findutils bug reporting page: http://savannah.gnu.org/bugs/?group=findutils



Information forwarded to debian-bugs-dist@lists.debian.org, Andreas Metzler <ametzler@debian.org>:
Bug#208307; Package findutils. (full text, mbox, link).


Acknowledgement sent to Andreas Metzler <ametzler@downhill.at.eu.org>:
Extra info received and forwarded to list. Copy sent to Andreas Metzler <ametzler@debian.org>. (full text, mbox, link).


Message #25 received at 208307@bugs.debian.org (full text, mbox, reply):

From: Andreas Metzler <ametzler@downhill.at.eu.org>
To: 208307@bugs.debian.org
Subject: Re: Bug#208307: option '-printf %k' returns wrong values
Date: Sat, 13 Mar 2004 18:13:58 +0100
tags 208307 fixed-upstream
thanks
On 2003-09-02 Andreas Metzler <ametzler@downhill.at.eu.org> wrote:
[...]
> I agree that find's (info) documentation
[...]
> is too short and fails to convey this difference. 
[...]

According to
http://savannah.gnu.org/bugs/?func=detailitem&item_id=5034 fixed in
CVS.
             cu andreas
-- 
"See, I told you they'd listen to Reason," [SPOILER] Svfurlr fnlf,
fuhggvat qbja gur juveyvat tha.
Neal Stephenson in "Snow Crash"



Tags added: fixed-upstream Request was from Andreas Metzler <ametzler@downhill.at.eu.org> to control@bugs.debian.org. (full text, mbox, link).


Reply sent to Andreas Metzler <ametzler@debian.org>:
You have taken responsibility. (full text, mbox, link).


Notification sent to Christian Fughe <c.m.fughe@wtb.tue.nl>:
Bug acknowledged by developer. (full text, mbox, link).


Message #32 received at 208307-close@bugs.debian.org (full text, mbox, reply):

From: Andreas Metzler <ametzler@debian.org>
To: 208307-close@bugs.debian.org
Subject: Bug#208307: fixed in findutils 4.2.22-1
Date: Mon, 13 Jun 2005 15:47:34 -0400
Source: findutils
Source-Version: 4.2.22-1

We believe that the bug you reported is fixed in the latest version of
findutils, which is due to be installed in the Debian FTP archive:

findutils_4.2.22-1.diff.gz
  to pool/main/f/findutils/findutils_4.2.22-1.diff.gz
findutils_4.2.22-1.dsc
  to pool/main/f/findutils/findutils_4.2.22-1.dsc
findutils_4.2.22-1_i386.deb
  to pool/main/f/findutils/findutils_4.2.22-1_i386.deb
findutils_4.2.22.orig.tar.gz
  to pool/main/f/findutils/findutils_4.2.22.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 208307@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Andreas Metzler <ametzler@debian.org> (supplier of updated findutils package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon, 13 Jun 2005 19:39:46 +0200
Source: findutils
Binary: findutils
Architecture: source i386
Version: 4.2.22-1
Distribution: unstable
Urgency: low
Maintainer: Andreas Metzler <ametzler@debian.org>
Changed-By: Andreas Metzler <ametzler@debian.org>
Description: 
 findutils  - utilities for finding files--find, xargs, and locate
Closes: 208307 301934 311384 312760 312761 313081
Changes: 
 findutils (4.2.22-1) unstable; urgency=low
 .
   * New upstream version
     - fixes infinite loop of "find -follow" on trees with symlinks to ./.
       (Closes: #313081)
     - better documentation for %k and %d printf directives. (Closes: #208307)
     - find filters out non-printable characters (which could mess up the
       terminal) when printing the output to a console. (Closes: #311384)
     - Typo fixes. (Closes: #301934, #312760, #312761) (Thanks, A Costa.)
Files: 
 84b082128b8f4b109efed4749d7d322e 662 base required findutils_4.2.22-1.dsc
 81ef043fbc9203f03225d0dc7f6cb2ec 972905 base required findutils_4.2.22.orig.tar.gz
 8612990949c3c1e82ea102cf856059ab 12261 base required findutils_4.2.22-1.diff.gz
 df01940ef18ccd6996366396b1b26b7b 304976 base required findutils_4.2.22-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFCrdHJHTOcZYuNdmMRAoe1AJ43bqjSDvNOFYEWrqGFMxmoh/fdMgCeO46A
NvtVymuuVlQJXpfkZnHYAU4=
=T/Ar
-----END PGP SIGNATURE-----




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Dec 23 16:49:33 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.