Defragment HDD

Dan Nelson dnelson at
Thu Jul 24 13:12:43 PDT 2003

In the last episode (Jul 24), Peter Rosa said:
> From: "Scott Kupferschmidt" <sk at>
> > On Thu, 24 Jul 2003, Peter Rosa wrote:
> > > is it possible, and by using what program, to defragment HDDs
> > > under FreeBSD ?
> >
> > I always cat /dev/zero > file
> > wait until the drive fills up, rm file and you're set.
> OK, but it is not the "real defragmenting" like Norton Speedisk or MS
> Defrag on windoze machines. Is there anything other ?

I think he was joking :)  The FFS filesystem reserves 8% of the disk
space so that it can allocate contiguous blocks for files.  In general,
you don't have to worry about file fragmentation.  There are no tools
for optimizing the layout of a disk (putting files in a directory next
to each other on disk, for example) like SpeedDisk does, though.

	Dan Nelson
	dnelson at

More information about the freebsd-questions mailing list