|
|
|
|
|
by mlaux
2065 days ago
|
|
> There is only one exception to the rule of identical treatment of files on different devices: no link may exist between one file system hierarchy and another. This restriction is enforced so as to avoid the elaborate bookkeeping which would otherwise be required to assure removal of the links when the removable volume is finally dismounted. In particular, in the root directories of all file systems, removable or not, the name .. refers to the directory itself instead of to its parent. Is this saying that if I had a removable disk mounted at /mnt/foo and issued “cd ..” in that directory, I’d remain in /mnt/foo instead of moving up to /mnt? When did this change to the current behavior? |
|
"no link" literally means no link. It's the straightforward meaning of (an ordinary, not symbolic) "link" in Unix filesystems. They cannot cross devices.
And on disc, ".." in the root is a link to the same directory. (POSIX allows for it to be this, which is the conventional Unix behaviour, or not to exist, which is the case on some non-Unix filesystems and operating systems where conceptually there is stuff "above" the root.)
Executing "cd .." ignores what is on disc at a mount point, and traverses the mount upwards.
Remember that "filesystem" has three meanings: the on-disc format of a DASD volume, the overall tree abstraction presented by the operating system, or what is presented by an FS driver.