What is the difference between physical and logical paths?

The difference between physical and logical paths lies in how they represent the directory structure in a filesystem:

  1. Physical Path:

    • Represents the actual location of files and directories on the disk.
    • It does not follow symbolic links; instead, it shows the true path to the directory.
    • For example, if a symbolic link points to another directory, the physical path will show the target directory's actual location.
  2. Logical Path:

    • Represents the path as it appears in the filesystem, including any symbolic links.
    • It resolves symlinks to show the path that the user would see when navigating through the filesystem.
    • For example, if you are in a directory that is a symlink to another directory, the logical path will show the symlink's path rather than the target's physical path.

In summary, the physical path shows the real structure of the filesystem, while the logical path reflects how the user navigates through it, including any symlinks.

0 Comments

no data
Be the first to share your comment!