From owner-freebsd-questions Wed Jan 30 9:54:42 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mail.27in.tv (roc-66-24-112-7.rochester.rr.com [66.24.112.7]) by hub.freebsd.org (Postfix) with ESMTP id 54F4237B417; Wed, 30 Jan 2002 09:54:36 -0800 (PST) Received: (from root@localhost) by mail.27in.tv (8.11.6/8.11.6) id g0UHsYs10594; Wed, 30 Jan 2002 12:54:34 -0500 (EST) (envelope-from cjm2@earthling.net) Received: from 27in.tv (roc-66-24-112-7.rochester.rr.com [66.24.112.7]) by mail.27in.tv (8.11.6/8.11.6av) with SMTP id g0UHsW810585; Wed, 30 Jan 2002 12:54:32 -0500 (EST) (envelope-from cjm2@earthling.net) Received: from 216.153.201.212 (SquirrelMail authenticated user cjm2) by www1.27in.tv with HTTP; Wed, 30 Jan 2002 12:54:32 -0500 (EST) Message-ID: <2269.216.153.201.212.1012413272.squirrel@www1.27in.tv> Date: Wed, 30 Jan 2002 12:54:32 -0500 (EST) Subject: Re: Incorrect du and df info woes... From: "C J Michaels" To: In-Reply-To: <20020129214729.P79208@blossom.cjclark.org> References: <20020129214729.P79208@blossom.cjclark.org> X-Priority: 3 Importance: Normal X-MSMail-Priority: Normal Cc: X-Mailer: SquirrelMail (version 1.2.5 [cvs]) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by AMaViS perl-11 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Crist J. Clark said: > On Tue, Jan 29, 2002 at 07:36:26PM -0800, Hans Christensen wrote: <<...snip>> > The concept of "file size" can be a bit tricky. How "long" a file is > and how much disk space a file uses are not necessarily the same. > > A fun example, > > $ dd of=bigfile if=/dev/zero seek=1000m count=1 > 1+0 records in > 1+0 records out > 512 bytes transferred in 0.000240 secs (2132556 bytes/sec) > $ ls -l bigfile > -rw-r--r-- 1 cjc cjc 536870912512 Jan 29 21:44 bigfile > $ du bigfile > 40 bigfile > > Heh. Have a look at the little blurb in the handbook or FAQ (forget > which) about putting a terabyte file on a floppy for more. Section 3.31 in the FAQ. That's an interesting little fact I didn't know. I think several synapses just committed suicide trying to wrap my mind around that one. Which leads me to a couple questions... 1. Can you (or anyone) recommend where I look to find more info on the symantics of the filesystem that allow this? 2. Is there any way to then determine how much actual drive space the file takes up? Actually, nevermind on that one, "du -a" seems to do it. I'll leave it in here for archival purposes. Thanks, > -- > Crist J. Clark | cjclark@alum.mit.edu > | cjclark@jhu.edu > http://people.freebsd.org/~cjc/ | cjc@freebsd.org -- Chris "I'll defend to the death your right to say that, but I never said I'd listen to it!" -- Tom Galloway with apologies to Voltaire To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message