Skip to content
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

Control minimum file size #1

Closed
pauldreik opened this issue Apr 7, 2018 · 7 comments
Closed

Control minimum file size #1

pauldreik opened this issue Apr 7, 2018 · 7 comments

Comments

@pauldreik
Copy link
Owner

@pauldreik pauldreik commented Apr 7, 2018

Sometimes it is of interest to ignore small files. rdfind already ignores empty files by default. The suggestion is to replace the -ignoreempty flag (or complement it) with a -minsize N flag where N is the minimum size in bytes. Using N=0 would mean empty files are included.

This is an old issue, reported by Andrew Buehler 20131130.

@thomas-mc-work
Copy link

@thomas-mc-work thomas-mc-work commented Apr 12, 2018

Also it would be great to have a sensible default of e.g. 0.5 MB. This would likely speed up every execution a lot.

pauldreik pushed a commit that referenced this issue Oct 13, 2018
pauldreik pushed a commit that referenced this issue Oct 13, 2018
pauldreik pushed a commit that referenced this issue Oct 13, 2018
@pauldreik
Copy link
Owner Author

@pauldreik pauldreik commented Oct 13, 2018

This is now implemented. The default is 1 byte, because -minsize1 is a synonym to -ignoreempty true, which is already the default.
There is a pretty obvious possible optimization to handling small files which are to be ignored: carrying out the check earlier, before they are added to the list of files to be investigated. Perhaps I will try to fix that as well...

@thomas-mc-work
Copy link

@thomas-mc-work thomas-mc-work commented Oct 23, 2018

I think this is worth a release, maybe 1.4.

@pauldreik
Copy link
Owner Author

@pauldreik pauldreik commented Oct 23, 2018

Yep, that is the plan. I have some other changes as well which are almost finished.

@pauldreik pauldreik closed this Oct 28, 2018
@pauldreik
Copy link
Owner Author

@pauldreik pauldreik commented Oct 28, 2018

This is now in https://github.com/pauldreik/rdfind/releases/tag/releases%2F1.4.0-alpha0 Would you mind giving it a go, @thomas-mc-work ?
Thanks.

@thomas-mc-work
Copy link

@thomas-mc-work thomas-mc-work commented Oct 29, 2018

I'll test it this week.

@thomas-mc-work
Copy link

@thomas-mc-work thomas-mc-work commented Nov 21, 2018

Excuse me for the delay. I've tested this now and it's working gracefully.

Optionally it'd be lovely to have short notations for kilo/mega bytes like 4M or 10K.

Thank you for this feature!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants