I have a Unix-y bash script and a Python script:
#!/bin/bash
for item in $*
do
for file in `find $item -type f`
do
bitscrubber_internal $item
done
rm -rf $item
done
and
#!/usr/bin/python
import sys
filename = sys.argv[1]
length = len(open(filename).read())
for number in [0x0, 0xff, 0xf0, 0x0f]:
open(filename, 'wb').write(('%f' % number) * length)
I know this will run into preventable scaling issues if it encounters a file that won't fit in memory, but apart from that, will this scrub over the same bits in the file, or create a new file which scrubs old blocks only by coincidence? I am running Lion.