Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Thanks for your answer! time results: your command - 1.24 minutes, etopylight's command - 2.45 minutes for 300 000 dirs. Commented Nov 27, 2017 at 2:56
  • Nice, didn't know that print can be piped to an external command inside awk :) Commented Nov 27, 2017 at 6:46
  • 1
    @etopylight, thank you! Awk has some very cool details. The main reason why why awk is fast is that disk mechanical elements end up making it "serial". Your solution (that I up-voted) is very useful for the (and faster) for the not-so-IO-intensitive situations. Commented Nov 27, 2017 at 8:29
  • @don-prog, thank you the comment and for the time results. Commented Nov 27, 2017 at 14:10