Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jan 2002 12:54:32 -0500 (EST)
From:      "C J Michaels" <cjm2@earthling.net>
To:        <cjc@freebsd.org>
Cc:        <freebsd-questions@freebsd.org>
Subject:   Re: Incorrect du and df info woes...
Message-ID:  <2269.216.153.201.212.1012413272.squirrel@www1.27in.tv>
In-Reply-To: <20020129214729.P79208@blossom.cjclark.org>
References:  <20020129214729.P79208@blossom.cjclark.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2269.216.153.201.212.1012413272.squirrel>