Skip to content

Conversation

@JurjenBokma
Copy link

Change

Have file and buffer size options accept arguments like '2k', '6M', '20G'.

Reasoning

I typed something like: rdfind -minsize 1G . and got confusing output until I figured the 'G' suffix was not supported.
I would like such file size suffixes to work.

Testing

To my shame, I did only cursorily test the new feature, and neglected to re-run the tests already present.

Note

Thank you for sharing rdfind. Having to dedup a few TB on disk, I found it useful.

@JurjenBokma
Copy link
Author

JurjenBokma commented May 28, 2025

Fixes #134
All tests still pass.

#include <cstdlib>
#include <cstring>
#include <iostream>
#include <stdexcept>
Copy link
Author

@JurjenBokma JurjenBokma May 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File size conversion throws runtime_error on invalid suffix. So we need to include stdexcept.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant