Unix Technical Forum

File system errors: "cannot get current working directory"

This is a discussion on File system errors: "cannot get current working directory" within the Sco Unix forums, part of the Unix Operating Systems category; --> (SCO 506, running Vision 3.10.911) A win2k client is running something call MaxiMirror, which, essentially copies files from one ...


Go Back   Unix Technical Forum > Unix Operating Systems > Sco Unix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-15-2008, 10:42 AM
Nachman Yaakov Ziskind
 
Posts: n/a
Default File system errors: "cannot get current working directory"

(SCO 506, running Vision 3.10.911)

A win2k client is running something call MaxiMirror, which, essentially copies
files from one location to another. Here, the app copies 3 gigabyte sized files
from the local drive to a (Vision) network drive. (Upon sober reflection, it
might also re-create the target directory.) The only thing wrong is that if I'm
at the prompt, in the target directory, when the app runs, I am then unable to
view the directory, thus:

(before)
/u/qt/backup: l
total 3739820
-rwxrwxrwx 1 root sys 635715584 Sep 27 04:13 QTDBA.exp
-rwxrwxrwx 1 root sys 30258 Sep 27 04:13 QTDBA.log
-rwxrwxrwx 1 root sys 635736064 Sep 28 04:14 QTDBB.exp
-rwxrwxrwx 1 root sys 30258 Sep 28 04:14 QTDBB.log
-rwxrwxrwx 1 root sys 635754496 Sep 29 04:14 QTDBC.exp
-rwxrwxrwx 1 root sys 30258 Sep 29 04:14 QTDBC.log

(after)
/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?

--
_________________________________________
Nachman Yaakov Ziskind, EA, LLM awacs@egps.com
Attorney and Counselor-at-Law http://ziskind.us
Economic Group Pension Services http://egps.com
Actuaries and Employee Benefit Consultants
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-15-2008, 10:42 AM
John DuBois
 
Posts: n/a
Default Re: File system errors: "cannot get current working directory"

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.

John
--
John DuBois spcecdt@armory.com KC6QKZ/AE http://www.armory.com/~spcecdt/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-15-2008, 10:42 AM
Bela Lubkin
 
Posts: n/a
Default 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<

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-15-2008, 10:42 AM
Stuart J. Browne
 
Posts: n/a
Default Re: File system errors: "cannot get current working directory"


"Nachman Yaakov Ziskind" <awacs@egps.com> wrote in message
news:20030929170444.A21187@egps.egps.com...
> (SCO 506, running Vision 3.10.911)
>
> A win2k client is running something call MaxiMirror, which, essentially

copies
> files from one location to another. Here, the app copies 3 gigabyte sized

files
> from the local drive to a (Vision) network drive. (Upon sober reflection,

it
> might also re-create the target directory.) The only thing wrong is that

if I'm
> at the prompt, in the target directory, when the app runs, I am then

unable to
> view the directory, thus:
>
> (before)
> /u/qt/backup: l
> total 3739820
> -rwxrwxrwx 1 root sys 635715584 Sep 27 04:13 QTDBA.exp
> -rwxrwxrwx 1 root sys 30258 Sep 27 04:13 QTDBA.log
> -rwxrwxrwx 1 root sys 635736064 Sep 28 04:14 QTDBB.exp
> -rwxrwxrwx 1 root sys 30258 Sep 28 04:14 QTDBB.log
> -rwxrwxrwx 1 root sys 635754496 Sep 29 04:14 QTDBC.exp
> -rwxrwxrwx 1 root sys 30258 Sep 29 04:14 QTDBC.log
>
> (after)
> /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?


It sounds like the MaxiMirror software is removing the destination
directory entirely (not just the files within it), then re-creating it.

This means that the INode that the directory-name once pointed too is no
longer the same. That is why you get the error you are getting whilst
trying to list it.

If you go to the parent, and do a 'ls -li', take note of the nubmer at the
beginning (inode), then do the MaxiMirror thingie, and repeat, you should
see that first number change.

if it doesn't, then what I'm suggesting isn't occuring..

Anyway, something to look at

bkx


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:48 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com