From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 16 Nov 1994 17:47:26 -0500 From: Philip Guenther guenther@stolaf.edu Subject: bind vs pwd Topicbox-Message-UUID: 045a26fa-eac8-11e9-9e20-41e7f4b1d025 Message-ID: <19941116224726.q_Wo6-YDdC9qeP_NfUxngvDGPnwr4VVoNLGujiIKoLk@z> >Given bind -c /usr/$user/tmp /tmp >if I cd to /usr/$user/tmp and then cd .., pwd says that I'm now in /. >I expected to be in /usr/$user. Is that how it's supposed to work, >or am I all confused about something? bind is not like ln -s. The bind command shown above makes /tmp into a union directory, containing the union of the previous contents of /tmp (probably nothing in this case), and the contents of /usr/$user/tmp. In addition, the -c flag specifies that files created in /tmp should *really* be created in /usr/$user/tmp. This is critical here as /tmp is unwritable previous to this. However, /tmp is still /tmp. It's contents are really somewhere else, but as far as the shell is concerned, nothing has happened. The kernel may catch readdir() a lie a little, but cd is unaffected. I think you may be able to "trick" it with something like: bind -c /usr/tor/tmp /tmp mkdir /tmp/foo cd /tmp/foo cd .. I think that will leave you in /usr/tor, as the cd takes you to /usr/tor/tmp/foo. At least that's what it appears to me... Philip Guenther guenther@stolaf.edu (Philip Guenther) St Olaf College, Northfield, MN 55057 (defun sig-hook () (insert-disclaimer 'my-opinion-only 'powerless-student)) "To go outside the mythos is to become insane..." -Robert Pirsig