-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
shred: detected block size differs from GNU #7870
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@BenWiederhake Good catch. Thanks! Digging a bit into GNU coreutils, gnulib, and glibc shows that the default block size shouldn't be a constant. The most common values are 512 bytes and 4K bytes, which seem to be chosen to align with default block or page sizes. The size may depend on both runtime and compile-time factors. For example, GNU Coreutils uses I'll try using a 4K constant just to experiment with different block sizes, observe how the tests behave, and gather some data. (See PR #7886) But it seems that the more accurate approach would be to use |
@tertsdiepraam Hello I noticed your commit that changed the block size. If you remember any details about why 65K was chosen, that would be helpful and interesting to know. Any additional thoughts or comments would also be appreciated. Thank you in advance |
Sorry, I don't remember. That's a long time ago 😄 Feel free to change it |
This commit changes the default block size for the shred utility to make it more consistent with the GNU coreutils version. Issue uutils#7870
OK. Thx for the fast response 😄 |
Please don't look at the GNU coreutils source code or link it here, the license isn't compatible. See the warning in CONTRIBUTING.md for details. |
uutils
du
uses a different block size than GNUdu
, which leads to files of different sizes: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:The text was updated successfully, but these errors were encountered: