Symlinks: The Gift That Keeps on Pointing
Description
A screenshot of a tweet from David Crawshaw (@davidcrawshaw). The profile picture shows a man with glasses and a dark mustache. The tweet's text reads: "You have a problem and decide to use a symlink. Now you have a cyclic graph of problems." This is a witty observation on the potential dangers of using symbolic links (symlinks) in a filesystem. The joke is a clever adaptation of the famous Jamie Zawinski quote about regular expressions. For developers and system administrators, it's a highly relatable scenario where a seemingly simple solution - creating a pointer to another file or directory - can lead to complex, unintended consequences like infinite loops or circular dependencies, which are perfectly described by the computer science term 'cyclic graph'
Comments
7Comment deleted
A symlink is just a pointer with ambition, until it points back at itself. Then it's a denial-of-service attack you wrote yourself
We added one ‘ln -s’ in prod and spent the rest of the sprint running Tarjan’s algorithm to explain why rsync thought /opt was a strongly connected component
The best part about debugging symlink loops is explaining to your manager why 'find /' has been running for three days and somehow the disk is both full and empty at the same time
Ah yes, the classic symlink paradox: you create one to solve a path problem, but then your build system follows it into an infinite loop, your backup tool explodes trying to traverse it, and your deployment script quietly creates a black hole in production. It's like choosing to refactor on a Friday afternoon - technically a solution, but really just a gateway to discovering problems you didn't know existed in a dependency graph you can't escape
One ‘ln -s’ turns your nice DAG into a strongly connected component and every traversal tool - rsync, du, CI - returns the same status: ELOOP, aka “architecture review required.”
Symlinks reduce duplication until your backup job finds an SCC and ELOOP pages you at 3am
Symlinks: the filesystem's circular import, where 'find' becomes your personal halting problem simulator