Re: File system errors: "cannot get current working directory" John DuBois wrote:
> In article <20030929170444.A21187@egps.egps.com>,
> Nachman Yaakov Ziskind <awacs@egps.com> wrote:
> >/u/qt/backup: l
> >l: warning: cannot get current working directory: Not a directory (error 20)
> >l: . not found: Not a directory (error 20)
> >
> >Now, a simple cd command (to the same directory) will solve my problem, but
> >what's going on here?
>
> The directory has been removed. Since it doesn't exist, it can't be referenced
> with '.'. A new directory may have been created where it was, but that isn't
> the directory you're in - your current directory is identified by inode, not
> path.
And you can confirm this. Before running the command that causes the
problem, run:
$ l # verify it works
$ l -id . # notice the inode number
Then do the command that causes the problem. Then:
$ l # fails with "cannot get working directory"
$ cd same
$ l -id . # notice the _different_ inode number
>Bela< |