From: "Anthony Chee" Subject: File size and block size Date: Thu, 18 Apr 2002 05:36:44 +0800 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <000901c1e657$f94caea0$0100a8c0@winxp> Mime-Version: 1.0 Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: 7bit Return-path: Received: from winxp ([203.169.178.107]) by hkpa04.polyu.edu.hk (Netscape Messaging Server 4.15) with ESMTP id GUQEOD00.TEC for ; Thu, 18 Apr 2002 05:36:13 +0800 To: List-Id: linux-fsdevel.vger.kernel.org Dear all, The block size of my disk partition is 1024. I did the following test, 1. Copy a file with 3312 bytes to the target disk, it should occupy 3312/1024 = 3.2 = 4 blocks by calculation. And I use "df" to check that it also occupy 4 blocks 2. Copy a file with 34024 bytes to the target disk, it should occupy 34024/1024 = 33.2 = 34 blocks. But I found that it occupied 35 blocks 3. Copy a file with 5693440 bytes to the target disk, it should occupy 5693440/1024 = 5560 blocks. But it is shown that it occupied 5573 blocks by using "df" Why there is a difference by calculation and using "df"? How to check that what is the actual number of blocks that a file will occupy before copying? Thanks, Regards, Anthony