Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-Id: <5.1.1.5.2.20020830220422.00a6d228@mail.earthlink.net> X-Sender: jeremyhetzler AT mail DOT earthlink DOT net Date: Fri, 30 Aug 2002 22:13:47 -0700 To: cygwin AT cygwin DOT com From: Jeremy Hetzler Subject: find misreports file size when using %b, %k Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed The "find -printf" escapes %b and %k should return filesize in 512-byte blocks and in 1k blocks, respectively. Instead, %b returns size in 1k blocks, and %k returns size in 2k blocks; i.e. the values are half those expected. %s, filesize in bytes, works correctly. Is this standard behavior, or Patches Gratefully Accepted? (Win2k, NTFS, Cygwin ver 1.3.12-4) $ dd if=/dev/null of=foo bs=1024 count=0 seek=1000 0+0 records in 0+0 records out $ ls -la foo -rw-r--r-- 1 steveb None 1024000 Aug 30 22:03 foo $ du -sk foo 1000 foo $ find -name "foo" -printf "%s %b %k" 1024000 1000 500 $ find --version GNU find version 4.1.7 From find.info: >Size Directives >............... > >`%k' > File's size in 1K blocks (rounded up). > >`%b' > File's size in 512-byte blocks (rounded up). > >`%s' > File's size in bytes. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/