1

How is the path of a directory retrieved in UNIX filesystems? Since directories are pointing to subdirectories it seems like the path need to be set together from the parent and parent parents etc.

Is this how it's done or are the paths stored somewhere in the inodes?

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
Stefan
  • 111
  • 4
    No, the path is not stored in the inode. That wouldn't make much sense because an inode can have multiple hard links which could be placed in multiple different directories, so there isn't a single path that points to the inode. Each directory contains a list of its subdirectories and contained files, and a path is constructed by appending the names of all these path components together. – Martin von Wittich Jun 05 '16 at 15:06

0 Answers0