Re: ls on ZFS showing unexpected directory content

From: Michael Gmelin <grembo_at_freebsd.org>
Date: Tue, 13 Sep 2022 07:46:54 UTC

On Mon, 12 Sep 2022 11:23:53 +0200
Michael Schuster <michaelsprivate@gmail.com> wrote:

> On Mon, Sep 12, 2022 at 11:19 AM Michael Gmelin <grembo@freebsd.org>
> wrote:
> >
> > Hi,
> >
> > Situation:
> > - shell is bash
> > - Root container mounted on zroot
> > - extra container mounted on /extracontainer, on USB drive which
> > spins down on idle
> > - cd /extracontainer
> > - cd subdir (takes a while, as drive has to spin up - getting bored,
> >   hitting CTRL-C)
> > - prompt still shows /extracontainer, but `ls` now shows content of
> >   /extracontainer/subdir
> > - cd .. && cd extracontainer
> > - Now `ls` shows content of /extracontainer
> >
> > Expected behavior?  
> 
> on the face of it, this looks as if the shell's prompt wasn't being
> updated. What do '/bin/pwd' and builtin 'pwd' print?

My thoughts as well. It's easily reproducible, in-built `pwd` and
`/bin/pwd` both show the correct path, the PWD environment variable
shows the wrong path (and, consequently, OLDPWD as well as the command
prompt).

> 
> For completeness: which version of FreeBSD?

13.1-STABLE last updated September 2nd.

Cheers

> 
> regards
> Michael
> 
> >
> > Thanks
> > Michael
> >
> > --
> > Michael Gmelin
> >  
> 
> 



-- 
Michael Gmelin