-
-
Notifications
You must be signed in to change notification settings - Fork 782
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
support size filter option #276
Comments
Thank you for your feedback! Filtering by file size is something that I would consider not to be part of the "80% of the use cases" (see README). If we decide to include this (and related tickets #165 and #273), I guess we have to re-consider that statement at some point 😄. Before we move forward with this, I would like to discuss a clear strategy on how to implement this. In particular, I would like to know which kind of syntax we would use for file-size filtering. |
For the syntax I'd suggest something as: And for ranges: It should accept both capital and non-capital k for kilobytes ( |
Thank you for the feedback!
Exactly. Maybe we could introduce two arguments ( |
That seems pretty reasonable. I was going to suggest following the same syntax as |
Actually, I'd be interested in some real world use cases for the usage of the size option. I don't think I have ever used |
I actually just did it recently to delete all small files from a backup directory I had. There were a ton of small hidden files created by various programs and so I looked for all files under 100KiB. I went to use fd first but it didn't support this feature so I had to use find instead. |
With
I think that looks better. |
@sharkdp I'd like to take this one if it is to be included. It seems the most straightforward idea may be to use an adapted version of the same notation as find with --size +N and --size -N. With |
@stevepentland Okay - sounds good. Thanks! |
Closed via #286. Thank you very much, @stevepentland. |
Released in v7.1.0 |
@sharkdp how to find only equal size, not greater and less? |
See #696 This is supported in fd v8.2.1:
|
find
supports the-size
filter, couldfd
do that too?The text was updated successfully, but these errors were encountered: