1ZEROFREE(8)                 System Manager's Manual                ZEROFREE(8)
2
3
4

NAME

6       zerofree — zero free blocks from ext2/3 file-systems
7

SYNOPSIS

9       zerofree [-n]  [-v]  filesystem
10

DESCRIPTION

12       zerofree  finds  the  unallocated, non-zeroed blocks in an ext2 or ext3
13       filesystem (e.g. /dev/hda1) and fills them with zeroes. This is  useful
14       if  the  device  on  which this file-system resides is a disk image. In
15       this case, depending on the type of disk image, a secondary utility may
16       be  able  to  reduce the size of the disk image after zerofree has been
17       run.
18
19       The usual way to achieve  the  same  result  (zeroing  the  unallocated
20       blocks)  is to run dd (1) to create a file full of zeroes that takes up
21       the entire free space on the drive, and then delete this file. This has
22       many disadvantages, which zerofree alleviates:
23
24          ·  it is slow;
25
26          ·  it makes the disk image (temporarily) grow to its maximal extent;
27
28          ·  it  (temporarily)  uses all free space on the disk, so other con‐
29             current write actions may fail.
30
31       filesystem has to be unmounted or mounted  read-only  for  zerofree  to
32       work.  It  will exit with an error message if the filesystem is mounted
33       writable. To remount the  root  file-system  readonly,  you  can  first
34       switch to single user runlevel (telinit 1) then use mount -o remount,ro
35       filesystem.
36
37       zerofree has been written to be run from GNU/Linux systems installed as
38       guest  OSes inside a virtual machine. It may however be useful in other
39       situations.
40

OPTIONS

42       -n        Perform a dry run  (do not modify the file-system);
43
44       -v        Be verbose.
45

SEE ALSO

47       dd (1).
48

AUTHOR

50       This manual page was written by Thibaut Paumard  <paumard@users.source‐
51       forge.net>  for the Debian system (but may be used by others).  Permis‐
52       sion is granted to copy, distribute and/or modify this  document  under
53       the  terms  of  the  GNU General Public License, Version 2 or any later
54       version published by the Free Software Foundation.
55
56
57       On Debian systems, the complete text of the GNU General Public  License
58       can be found in /usr/share/common-licenses/GPL-2.
59
60
61
62
63                                                                   ZEROFREE(8)
Impressum