シンボリックリンクのターゲットとは?
シンボリックリンクのターゲットは、シンボリックリンク内部に記録されたパス名であり、システムはそれをたどって実際のファイルまたはディレクトリに到達します。ハードリンクと異なり、symlink はパスを含むだけの独自の小さなファイルなので、filesystem をまたいでディレクトリを指すこともできます。ターゲットが削除されたり誤っていたりすると、リンクは宙ぶらりんになり何も解決しません。
なぜ重要か
Toolchain や言語のバージョンマネージャーは、アクティブなインストールを指す symlink に依存しているため、ターゲットが壊れるとコマンドが静かに消えてしまいます。宙ぶらりんのリンクは、CI 環境で紛らわしい not-found エラーを引き起こす一般的な原因です。
関連ガイド
What Is a Hard Link?A hard link is an additional directory entry pointing to the same inode as a file, so multiple names refer to…
What Is an Inode?An inode is the on-disk record that stores a file metadata and the location of its data blocks, while the fil…
What Is Working Directory Inheritance?Working directory inheritance means a child process starts in the same current directory as its parent unless…