From owner-freebsd-questions@FreeBSD.ORG Tue Mar 16 18:38:29 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5874316A4CE for ; Tue, 16 Mar 2004 18:38:29 -0800 (PST) Received: from web1.hostrack.com (unknown [63.105.72.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3237B43D39 for ; Tue, 16 Mar 2004 18:38:29 -0800 (PST) (envelope-from stevei@black-star.net) Received: (qmail 26040 invoked from network); 17 Mar 2004 02:38:28 -0000 Received: from adslbt49.cofs.net (HELO altair) (66.77.169.49) by web1.hostrack.com with SMTP; 17 Mar 2004 02:38:28 -0000 Message-ID: <0ccf01c40bc9$15a34490$1a01a8c0@blackstar.net> From: "Steve Ireland" To: "Henning, Brian" References: <44llm0xzm0.fsf@be-well.ilk.org> Date: Tue, 16 Mar 2004 21:39:31 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4927.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 cc: freebsd-questions@freebsd.org Subject: Re: du X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2004 02:38:29 -0000 ----- Original Message ----- From: "Lowell Gilbert" To: "Henning, Brian" Cc: Sent: Tuesday, March 16, 2004 16:15 Subject: Re: du > Please don't top-post. > > "Henning, Brian" writes: > > > The only reason why I question it is when I lookup the size in windows > > (the directory is shared with samba) I see it as less. > > >From bsd: 390 /home/henninb/jpg > > >From windows: 372KB windows > > > > Is it because of the share or the change in platform? > > How did you measure it on Windows? I suspect what's happening is that > Windows gave you the actual sum of the sizes of all the files, whereas > du(1) counts the space *used* by all the files. In other words, the > Windows tool is giving a count in bytes, whereas du(1) is giving a > count in disk blocks (rounded up to the nearest block, because that > space is unavailable for other files to use). It may have. Starting with W2K, if you right click a file and select properties, you are given two file sizes: "Size" and "Size on disk". "Size on disk" is the total size - file size and the so-called slack space. Using any other method (such as Explorer or the dir command) gives only the file size. Always be careful to compare apples to apples ;) To get tangential for a moment, an interesting exercise is to discover how many different methods Windows has for reporting total harddrive size and how many different values are returned. An additional exercise for the advanced student is to find out why different methods report values. (Hint: Sometimes Windows sucks)