Re: How to "wipe" ALL Mac file's slack space?



In article <noneof-766A98.12574229062007@xxxxxxxxxxxxxxxxxxxxxxx>,
Mark Conrad <noneof@xxxxxxxxxxxxxxxxxx> wrote:

Differences between sectors, blocks, clusters, and slack space -

Sectors
*******
Sectors are the smallest storage units on a disk drive. A sector is a
fixed size, commonly 512 bytes on a Mac disk drive.
(sector is half of one KB, or two sectors per KB)

not completely correct. the newer drives (especially optical drives)
use sector sizes that are much larger than 512 bytes.

for a CD, read this wiki (cd-rom) snippet. Each sector is 2352 bytes,
and contains 2048 bytes of PC (MODE1) Data, 2336 bytes of PSX/VCD
(MODE2) Data, or 2352 bytes of AUDIO.


Slack space
***********
The part of the last 4KB cluster space that is NOT used by a file.

With a very large file, only the very last 4KB cluster of that large
file has any "slack space".


i once wrote a program that wrote a block of zeros in the slack space by
the following method.

1) get the current eof position.
2) set the current write position to the current eof.
3) write a cluster of nulls (hex 00) to the end of the file.
4) reset the eof of the file to the original position.

this must be done with every file. i wrote it mainly to make
compressing files and folders much more effective and it worked.
.



Relevant Pages

  • Re: Finding REALLY hidden files?
    ... Virtually all hard disk drives use, at the physical level, a sector ... the slack space is 511 bytes. ... large cluster size. ...
    (rec.video.desktop)
  • Re: Finding REALLY hidden files?
    ... Any left-over space in the last cluster of a file is lost, in that it will never be used for any other data. ... but slack space is slightly different than the space ... Virtually all hard disk drives use, at the physical level, a sector ... if the cluster size is 32 KB (and under FAT32 I *have* had drives with clusters that big) and you create a file of length one byte, it is not just the 511 bytes in the first sector that are lost to further use, it is also the 512 bytes in each of the other ...
    (rec.video.desktop)
  • Re: Does Windows 2000 through present copy slack space?
    ... That is indeed what I'm talking about, thanks Bjorn. ... but it also overwrites the destination slack space (at ... least in the current sector, if not the cluster). ...
    (microsoft.public.win2000.file_system)
  • Re: MCE2005 Storage Drive Cluster Size ?
    ... The other way to look at it is that in average each file waist half a sector size. ... >> In pursuit of improving my MCX wireless performance, ... > A larger cluster size is good for very large files, particularly very large files that are read sequentially. ... You might want to schedule a disk defrag more regularly than you otherwise might. ...
    (microsoft.public.windows.mediacenter)
  • Re: Bad clusters
    ... A cluster may crossover to another sector. ... any indications of bad areas on the drive are most ... On-Line Help Computer Service ...
    (microsoft.public.windowsxp.newusers)