PowerBook のディスクが消去できない

PowerBook 15" がリースアウトするのでディスクを消去して返そうと思ったらできない。Lepard のインストールディスクで起動してディスクユーティリティから消去しようとすると、"Resource busy" と言って失敗する。パーティションを切ろうとしても同じ。

ディスクが壊れたんだったらそのまま返すかと思ったら、ディスクからブートすると普通に使えてしまう。仕方ないので、別のルートアカウントからユーザアカウントを消して、不要なファイルを消した。

「確実にゴミ箱を空にする」を選ぶと気が遠くなりそうだったので、コマンドラインから作業することに。rm に -P なんていうオプションあったんだ。知らなかったよ。

-P
Overwrite regular files before deleting them. Files are overwritten three times, first with the byte pattern 0xff, then 0x00, and then 0xff again, before they are deleted.
BUGS
The -P option assumes that the underlying file system is a fixed-block file system. In addition, only regular files are overwritten, other types of files are not.

ということで、怪しいファイルだけ -P オプションを付けて rm して、他は普通に消してしまう。-v オプションを付けると消しているファイルを表示してくれて便利。ただし要注意:

COMPATIBILITY
The -v option is non-standard and its use in scripts is not recommended.

ファインダーから消去した場合には srm というコマンドが動くらしい。国防レベルじゃないから7回も必要ないような気がするので、3回くらいがちょうどいいかな。

-m, --medium
overwrite the file with 7 US DoD compliant passes (0xF6, 0x00, 0xFF, random, 0x00, 0xFF, random)