Since find is a fully recursive language, has globs and regexes, and start processes (-exec), it really belongs in the shell itself! In terms of its implementation, it almost completely overlaps with the shell.
Whether implementing it in Python is a good idea more or less hinges on OPy [2], but I’m assuming that will happen :-/
Hm I looked at the code [1] and it might be a decent start for this Oil issue:
Implement find / xargs in Python
Since
findis a fully recursive language, has globs and regexes, and start processes (-exec), it really belongs in the shell itself! In terms of its implementation, it almost completely overlaps with the shell.Whether implementing it in Python is a good idea more or less hinges on OPy [2], but I’m assuming that will happen :-/
[1] https://github.com/meitham/pygnutools/tree/master/pygnutools
[2] http://www.oilshell.org/blog/2018/03/04.html
In terms of pure python replacements for find and grep, I’m partial to
grinandgrind: https://pypi.python.org/pypi/grin/1.2.1Of course a pure python implementation isn’t going to be terribly fast. These days I’m a fan of the rust tools ripgrep and fd.