-
Notifications
You must be signed in to change notification settings - Fork 12
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
Filter files that do not match a size predicate #5
Comments
It'd be silly for find -size +1G | duff If your file names contain whitespace, you need to use null-termination: find -size +1G -print0 | duff -0 | xargs -n1 -0 echo The customizable header ( |
You're right, this is easily pipable. I'm closing this ticket. I must have been thinking of some other non-pipable functionality. I do have one question (probably not supposed to be in this ticket) - how does duff buffer the list of files that are fed in from |
Duff processes files a little and performs an initial sort as they come in, but most of the work cannot be started until all files have been collected, exactly because it does report all duplicates. |
Oh, I didn't know it batches them all first. I thought I've seen behavior
where the buffering prevented the full report and that it streams results
instead. I must be wrong.
|
The |
With
find
you can ignore files that are of little consequence, such as files that are really small or really big:This would be great for
duff
because when trying to free up disk space one wants to find the big files (e.g. videos) without the output being flooded by static web content (e.g. jquery-1.9.2.js, bootstrap.css).Hopefully that isn't too tough to implement, unlike sorting which would be great but probably algorithmically prohibitive. Being able to use duff with pipes to do things like filtering would be even smarter but I don't see a way to do it the way duff reports (except with the
-e
option which is a bit risky).The text was updated successfully, but these errors were encountered: