Volumes directory in Mac OS X

First, just understand that the /Volumes/ directory is where all mounted volumes on your Mac OS X system naturally show up. And the reason you see that behavior happen is because Macintosh/ is just a symbolic link to / (root) on your system; that is done in /Volumes so you still have named access to that volume in addition to the / (root) access to that volume.

For example, if you went into the Terminal on your system, typed cd /Volumes and then typed in ls -la you might see something that looks like this:

drwxrwxrwt@  7 root  admin   238 Sep 13 23:55 .
drwxr-xr-x  29 root  wheel  1054 Sep 13 01:43 ..
lrwxr-xr-x   1 root  admin     1 Sep 13 16:42 Macintosh -> /

A symbolic link is basically like an alias in the Finder; but on a file system level a symbolic link is what an “alias” is.

As for why you see it do that /Volumes/Macintosh/Volumes/Macintosh/Volumes/Macintosh in pwd that’s just the file system interpreting your path. Yes, it can seem weird and confusing but don’t be confused. The only mounted volume under /Volumes/ that behaves that way is the root (/) volume of your system. If you mount any other volumes, they will show up in /Volumes/ and will not loop like that since they will be actual, mounted volumes and not symbolic links.

Now as for the “why” of that nested symbolic link/directory behavior, that is not an easy question to answer. But basically all Linux/Unix systems behave like that. And this question and answer thread on the Unix & Linux Stack Exchange does go into some extreme detail as to why you nested directories caused by symbolic links exist.