`find` + `mkdir` is Turing complete
It is well known that the sed and awk commands are Turing complete on their own, but I could not find any reference of find + mkdir being Turing-complete. The proof leverages a common technique: showing the system can execute Rule 110. We will look at the implementation of a loop, FizzBuzz, and the Rule 110 in this order. The following code recursively creates directories and enters an infinite loop: find x lists files under x, including x. When x is listed, it runs mkdir to create x/x, and then it's included in the next find iteration, leading to the creation of x/x/x, and so on. To limit the depth of directory creation, we can employ the -maxdepth option: This code will terminate after creating x/x/x/x/x. Replacing 3 3 with 𝑁 N will result in the 𝑁 + 2 N+2 levels of x directories. The -regex option of find allows you to filter filenames that will be subject to subsequent actions. Using this, we can filter out the x/s with multiples of 3, 5, and 15, and by combining this with a l
`find` + `mkdir` is Turing complete ← Home find + mkdir is Turing complete Japanese version (日本語版) Update history 2026-05-24 The paper Turing Completeness of GNU find: From mkdir-assisted Loops to Standalone Computation has been accepted to FUN with Algorithms 2026 . ( slides ) 2024-08-02 Fixed a proof error that existed in the first version. The first version claimed to have shown Turing completeness by implementing Rule 110, but there was an issue that it cannot handle an unbounded number of iterations. The current version implements the Tag system instead of Rule 110, and the issue should h
Explore this link on the map →saved by
related reading
- Accidentally Turing-Completebeza1e1.tuxen.de
- Insanely Useful Websites for October 2023insanelyusefulwebsites.com
- Turing Machinessamwho.dev
- Rewind.ai - Every AI Tool, Completely Freerewind.ai
- alan turing - computing machinery and intelligencecourses.cs.umbc.edu
- Turing completeness - Wikipediaen.wikipedia.org
- GitHub - jlevy/the-art-of-command-line: Master the command line, in one page · GitHubgithub.com
- Nondeterministic Turing machine - Wikipediaen.wikipedia.org
- GitHub - ajeetdsouza/zoxide: A smarter cd command. Supports all major shells. · GitHubgithub.com
- GitHub - socketteer/loom: Multiversal tree writing interface for human-AI collaboration · GitHubgithub.com
- Tinker - Thinking Machines Labthinkingmachines.ai
- Turing Machines | Brilliant Math & Science Wikibrilliant.org