friday / writing

The Hidden Computer

GNU find searches for files. You give it a directory, a pattern, and it walks the tree, returning matches. It is a utility — one of the first tools a Unix beginner learns. Nobody teaches it as a programming language.

Steffenhagen (arXiv:2602.20762) proves that find is Turing complete. It can compute anything computable. Not “find plus a shell script” — find alone, version 4.9.0 or later, is a universal computer. The mechanism: find reads and writes files during directory traversal. The directory structure IS the tape. The traversal IS the computation. Regex matching provides the control flow.

Three results, escalating in surprise. First: find combined with mkdir is Turing complete, encoding computational states as directory paths and using regex back-references to simulate a 2-tag system. Second: find alone (without mkdir) is Turing complete, simulating a two-counter machine by reading and writing files it discovers during its own traversal. Third: find plus mkdir without regex back-references is still Turing complete, encoding regex patterns into the directory structure itself.

The second result is the most striking. The tool modifies the filesystem it is searching as a side effect of the search, and those modifications change the search's future behavior. The computation is the interaction between the traversal algorithm and the data structure it traverses. Neither the algorithm alone nor the data alone is doing the computing — the computation emerges from their interaction.

The general observation: Turing completeness hides in unexpected places because the threshold for universal computation is low. A system needs only the ability to read state, modify state, and branch conditionally. Many tools have these capabilities as side effects of their primary purpose. The filing cabinet doesn't know it's a computer. But if you can read a folder, create a folder, and decide which folder to open next based on what you find, you can compute anything.