On 01/09/2016 04:41 PM, James Youngman wrote:
> Let's re-open the discussion about what to call the "sane" alternative to
> -size, and implement it this time.
I'm not so enthusiastic, i.e., only 20:80 for adding such a -filesize option.
The question is: what functionality would it provide which could not be
achieved with existing ones? ... and we'd have to say: well, none.
Adding another option would only add complexity to the code (-size vs.
-filesize must be handled, too). And from the user's point of view, I'd
guess it'd be confusing too: "2 options for filtering by size? Huh? Which
one should I take?". Finally it doesn't help to clarify the situation
with the -size option - which is specified by POSIX and therefore also
available in other implementations.
I'd rather suggest to re-work the --help output to explain every single
option rather than just mentioning them as today. The usage text via --help
is the first thing a user tries to read when {s,}he's unsure. With the
longer format, we'd have the chance to avoid confusion at the first place
the user is looking for.
And IMHO using a text based on that of the POSIX spec for the -size option
would be the best I could think of.
Tests:
...
-regex PATTERN Match files by regular expression PATTERN
-size N[bcwkMG] Match if the file size in bytes, divided by 512 and
rounded up to the next integer, is N. Use suffix 'c'
for a comparison with bytes
-true Always true
...
WDYT?
Have a nice day,
Berny