On 07/30/2014 05:46 AM, 積丹尼 Dan Jacobson wrote: > Perhaps a -limit option could be added to find. > Would find -limit 22 be much more efficient than find|sed 22q ?
Thanks for the proposal, but could you please elaborate in what combination of other flags this might be most useful? I'm asking because I would assume that it would only / mostly useful if the output was sorted to find e.g. "the 22 biggest files", or "the 22 oldest files" or alike. However, find doesn't have a sorting feature - because that is the domain of other dedicated tools like sort. Therefore, I cannot imagine a good use case for "-limit 22". So while implementing -limit might be quite easy, it would still be more bloat to the code compared to its usefulness - considering the above. As you are already mentioning "find|seq 22q" which I think is one of the better alternatives. Thank you & have a nice day, Berny