[Courses] [FS] Lesson 4 - Read & Screenshot

Julie txjulie at austin.rr.com
Mon Nov 17 08:41:16 EST 2003


Meredydd wrote:
> Nope, that's normal. The fun bit comes when you try to save the file. 
> Depending on how your kernel is feeling today, and how vi handles its 
> files, you will get either the expected "read-only filesystem" error, 
> or (bizarrely) still be able to see the chunk of filesystem that's 
> supposed to be invisible. I've done this (accidentally) before now by 
> keeping a shell open, cd'ed into the about-to-be-hidden directory.
> 
> I only included that as an interesting side-note, and to try and 
> pursuade people to muck around a bit with their filesystems, that's 
> all.

This really isn't all that bizarre.  If the current working
directory of "vi" or your shell is in the overmounted piece
of filesystem tree, the kernel should resolve "." (the current
working directory) exactly where it was before.

What "mount" does is change how path name resolution is done.
As each piece of the path is being resolved, the mounted
filesystem table is examined to see if the current directory
has been mounted on top of.  If that's the case, instead of the
directory itself being used for the next path component, the
root of the mounted filesystem is used instead.  The kernel
doesn't keep track of your position in terms of absolute
pathnames, but rather in terms of a "current working directory".

Traversing towards the root of a filesystem works in the
opposite manner -- when ".." is encountered the table is
queried to see if the current component is the root of a
mounted filesystem, and if so, the directory which has been
mounted over is used.
-- 
Julianne Frances Haugh             Life is either a daring adventure
txjulie at austin.rr.com                  or nothing at all.
					    -- Helen Keller



More information about the Courses mailing list