9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Russ Cox <rsc@swtch.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] Union mount directory behavior?
Date: Tue, 27 Jan 2009 21:37:58 -0800	[thread overview]
Message-ID: <dd6fe68a0901272137x49894a44w30aa65d854e899c4@mail.gmail.com> (raw)
In-Reply-To: <20090128050202.GF7757@masters6.cs.jhu.edu>

> term% ramfs -m /n/ram1
> term% ramfs -m /n/ram2
> term% bind /n/ram1 /n/ram
> term% bind -a /n/ram2 /n/ram
> term% mkdir /n/ram1/test
> term% mkdir /n/ram2/test
> term% touch /n/ram1/test/foo
> term% touch /n/ram2/test/bar
> term% ls -l /n/ram
> d-rwxrwxr-x M 47 nwf nwf 0 Jan 27 23:55 /n/ram/test
> d-rwxrwxr-x M 45 nwf nwf 0 Jan 27 23:55 /n/ram/test
> term% ls -l /n/ram/test
> --rw-rw-r-- M 45 nwf nwf 0 Jan 27 23:55 /n/ram/test/foo
> term% cat /n/ram/test/bar
> cat: can't open /n/ram/test/bar: '/n/ram/test/bar' does not exist
>
> Why don't I see /n/ram/test/bar?

Unions are not recursive.
You put two directories named test in /n/ram.
Because of the -a on the second bind, the one
from ram1 comes first.  When you cd into test,
you get the one from ram1.  That one only contains foo.

Russ


      reply	other threads:[~2009-01-28  5:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-28  5:02 Nathaniel W Filardo
2009-01-28  5:37 ` Russ Cox [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dd6fe68a0901272137x49894a44w30aa65d854e899c4@mail.gmail.com \
    --to=rsc@swtch.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).