Closed
Description
uutils du
uses a different block size than GNU du
, which leads to files of different sizes:
$ echo a > foo && shred -v -n1 foo && du -b foo
shred: foo: pass 1/1 (random)...
4096 foo
$ echo a > foo && cargo run -q --features shred shred -v -n1 foo && du -b foo
shred: foo: pass 1/1 (random)...
65536 foo
I'm not convinced that this is fine, but there's a good chance. If you, dear reader, know for certain that this is fine, please add a paragraph to https://uutils.github.io/coreutils/docs/extensions.html#shred .
Found while trying to solve #5711.
EDIT: Also, this comment (and perhaps code) in shred.rs
needs to be updated:
// This block size seems to match GNU (2^16 = 65536)
const BLOCK_SIZE: usize = 1 << 16;