Missing '.' and '..' directories

Missing '.' and '..' directories

Post by Mark L. Wis » Wed, 03 Sep 1997 04:00:00



Hello all!!!

This is an interesting problem....  I have a client that somehow has deleted
the '.' and '..' entries in several directories.  I can create and remove
entries in
these directories, but I am unable to 'l'ist anything (gives an error
message that "l: cannot get the working directory: Not a directory (error
20)", I cannot
rm -r * from one layer down because it says that the directory is not empty...

BTW, this is SCO 3.2V5.0.2

Any ideas????

Mark
--------------------------------------------------------------------------------
Mark L. Wise, CPIM               | Voice: (614)868-5033  
President                        | Fax:   (614)868-1060

1312 Epworth Avenue              | WEB:   www.alpha2.com
Reynoldsburg, OH  43068-2116     | * Manufacturing/Distribution/Accounting SW
                                 | * WEB and E-mail Hosting Services
                                 | * Critical Server Hardware Maintenance
--------------------------------------------------------------------------------

 
 
 

Missing '.' and '..' directories

Post by Eric Levene » Wed, 03 Sep 1997 04:00:00



 > This is an interesting problem....  I have a client that somehow has deleted
 > the '.' and '..' entries in several directories.  I can create and remove
 > entries in
 > these directories, but I am unable to 'l'ist anything (gives an error
 > message that "l: cannot get the working directory: Not a directory (error
 > 20)", I cannot
 > rm -r * from one layer down because it says that the directory is not empty...

Very strange.

You can try to create . and .. using the link command (not ln)

For example : If the directory is "/your/directory/path", try :

cd /your/directory/path
link /your/directory/path .
link /your/directory ..

--

--------------------------------------------------------------------
ric Lvnez              "Felix qui potuit rerum cognoscere causas"

(NeXTMail, MIME)                                   Georgica, II-489
--------------------------------------------------------------------

 
 
 

Missing '.' and '..' directories

Post by Mark L. Wis » Wed, 03 Sep 1997 04:00:00


Quote:

>Hello all!!!

>This is an interesting problem....  I have a client that somehow has deleted
>the '.' and '..' entries in several directories.  I can create and remove
>entries in
>these directories, but I am unable to 'l'ist anything (gives an error
>message that "l: cannot get the working directory: Not a directory (error
>20)", I cannot
>rm -r * from one layer down because it says that the directory is not empty...

>BTW, this is SCO 3.2V5.0.2

>Any ideas????

ADDITIONAL INFORMATION:

I determined that the "." directory existed by typing "file ." and it responded
with the information that the "." directory existed and was a directory.  The
".." entry responded that it was a normal file... Once the ".." file was
deleted, I was able to rm the parent directory...  HOWEVER, the problem then
moved up one directory level.  The "." and ".." directories existed and were
now able to be displayed with the "l -a" command.  However when trying to
remove the parent directory, it still responded that the directory was not
empty....

Now what??

Mark
--------------------------------------------------------------------------------
Mark L. Wise, CPIM               | Voice: (614)868-5033  
President                        | Fax:   (614)868-1060

1312 Epworth Avenue              | WEB:   www.alpha2.com
Reynoldsburg, OH  43068-2116     | * Manufacturing/Distribution/Accounting SW
                                 | * WEB and E-mail Hosting Services
                                 | * Critical Server Hardware Maintenance
--------------------------------------------------------------------------------

 
 
 

Missing '.' and '..' directories

Post by Bela Lubki » Wed, 03 Sep 1997 04:00:00



> >This is an interesting problem....  I have a client that somehow has deleted
> >the '.' and '..' entries in several directories.  I can create and remove
> >entries in
> >these directories, but I am unable to 'l'ist anything (gives an error
> >message that "l: cannot get the working directory: Not a directory (error
> >20)", I cannot
> >rm -r * from one layer down because it says that the directory is not empty...

> >BTW, this is SCO 3.2V5.0.2
> I determined that the "." directory existed by typing "file ." and it responded
> with the information that the "." directory existed and was a directory.  The
> ".." entry responded that it was a normal file... Once the ".." file was
> deleted, I was able to rm the parent directory...  HOWEVER, the problem then
> moved up one directory level.  The "." and ".." directories existed and were
> now able to be displayed with the "l -a" command.  However when trying to
> remove the parent directory, it still responded that the directory was not
> empty....

Pay very careful attention to what you're doing, and log everything with
script(TC).  Record an entire examination of one of these bad
directories, clean it up, and post it here.  It's really hard to work
from a verbal description of something like this.  Also, mention the
filesystem type (probably HTFS, but it isn't good to assume such
things).

The other thing is, do a full fsck on the filesystem.  If it isn't the
root, unmount it and run `fsck -ofull /dev/whatever`.  If it is root,
reboot, go to single-user mode, and `fsck -o full /dev/root`.

- Show quoted text -

Quote:>Bela<

 
 
 

1. Sun 'find' is missing '-maxdepth'!

The find program on Sun OS does not contain the -maxdepth option.  How
can I get the effect of -maxdepth 1 in a directory containing
subdirectories?  I want find to -exec a command on all of the files in
the directory, but NOT on the files contained in the subdirectories.
If I use -prune, nothing is done since the file I'm specifying is a
directory.  I've tried various combinations of -prune, -depth, and
-type to no avail.

/dira/dirb/file1
           file2
           file3
           file4
           dirc/
                file5
                file6
                file7

'find /dira/dirb -print -maxdepth 1' does what I want - prints file1
thru file4, but not file5 thru file7.

How can I do the same thing on the current version of Sun OS on a
Sparc 2?

Thanks for any help!!
Leo

2. Can someone briefly tell me how to install SCO Unix ver4.0????

3. Apache 2.0.18a - 'Make' error re 'apr' - *.lo missing?

4. Adding icons to Non-root KDE Desktops

5. 'cryptdir' relies on missing 'crypt' ?

6. GCC/linux Newbie Question

7. What's an 'mcd device' (because it's missing)?

8. UnixWare 7 jobs in London, UK??

9. Q : Digital Unix 4.0 login problem : 'No directory!' & 'No shell!'

10. Directory w/o '.' and '..'

11. Error: 'Can't load module '/kernel': no such file or directory

12. Q: 'push' and 'pop' for changing directories?

13. 'push' and 'pop' for changing directories?