>_ IzzyLab

Topic breakdown

A symbolic (soft) link is a file holding a path to another object; links can point to links, forming a chain. readlink without flags prints exactly the link's contents — one step. readlink -f (or realpath) follows the whole chain and brings the path to canonical form: absolute, without ./.. and intermediate links. You need this when what matters is the final real object, not the nearest link.

What's checked

  1. correct final path
  2. it is a real directory, not a link

What it looks like