5

When a file is deleted, its only marked as an unused sector of a hard drive. Im wondering if it's possible to fill a 1gb HDD with 1024 individual 1mb files to completely use every sector?

Jens Erat
  • 23,446
  • 12
  • 72
  • 96
Scott
  • 51
  • 1

1 Answers1

5

No, that doesn't guarantee overwriting. If sparse files are enabled for your filesystem, long strings of zeroes might not actually be written out. Also, the area used by the filesystem to keep track of files (inode table or other nomenclature depending on the filesystem) probably wont' be filled and behavior varies greatly based on the filesystem you're using.

You must write at a lower level than the filesystem to blank out all writeable areas on a disk. Many drives also have remapped sectors at the firmware level for replacing bad sectors, so no normal OS behavior can access those.

Jeff Ferland
  • 38,090
  • 9
  • 93
  • 171