Skip navigation.
 
mlRe: Disk images and zeroing out space
FROM : Fabien Roy
DATE : Sat Nov 30 10:56:02 2002

Use mkfile to create a file full of zeroes then remove it.
> NAME
>        mkfile - create a file
>
> SYNOPSIS
>        mkfile [ -nv ] size[b|k|m|g] filename ...
>
> DESCRIPTION
>        mkfile creates one or more files that are suitable for use
>        as NFS-mounted swap areas.  The sticky bit is set, and the
>        file  is  padded  with  zeroes by default.  Non-root users
>        must set the sticky bit using chmod(1).  The default  size
>        unit  is  bytes, but the following suffixes may be used to
>        multiply by  the  given  factor:  b  (512),  k  (1024),  m
>        (1048576), and g (1073741824).
>
> OPTIONS
>        -n    Create  an  empty filename.  The size is noted, but
>              disk blocks aren't allocated until data is  written
>              to them.
>
>        -v    Verbose.  Report  the  names  and sizes of created
>              files.
>
> WARNING
>        If a client's swap file is removed and recreated, it  must
>        be  re-exported  before  the client will be able to access


On Saturday, Nov 30, 2002, at 03:05 US/Pacific, Nick Zitzmann wrote:

> When I've published some new versions of existing programs, I've been
> using the same "master" disk images and copying my new software over
> the old software, then creating a read only copy of the master disk
> and compressing it. This works, but these compressed disk images are
> getting bloated, and I suspect it's because my process here is leaving
> lots of space that is "free space" but contains the remains of files I
> deleted a long time ago.
>
> So, does anyone know any good methods of zeroing out unused space on a
> disk image? Should I just make a new disk image and copy everything
> over to it, or is there some sort of disk utility out there that can
> do this? Some other developer out there has to have done this > before...
>
> Nick Zitzmann
> AIM/iChat: dragonsdontsleep
> Check out my software page: http://dreamless.home.attbi.com/
>
> "La la la! I sing, too! For food, for food! La la la!" - Gabo, Dragon
> Warrior VII
>
> _______________________________________________
> MacOSX-dev mailing list
> <email_removed>
> http://www.omnigroup.com/mailman/listinfo/macosx-dev
>



Related mailsAuthorDate
mlDisk images and zeroing out space Nick Zitzmann Nov 30, 03:06
mlRe: Disk images and zeroing out space Fabien Roy Nov 30, 10:56
mlRe: Disk images and zeroing out space David Sinclair Nov 30, 10:59