pearse@hound.UUCP (S.PEARSE) (02/26/85)
I've got a good one for you unix wizards. Somehow (I don't know how), the "dot" or "." file in one of my directories was removed. I cannot read nor access anything in the directory as a result. In fact, I cannot even remove the directory! Apparently, that dot file was pretty darn important. Result is, I have a useless directory taking up disk space. Question is, can someone tell me how to remove a directory with no dot file. Better yet, can you tell me how to re-access the files in that directory? When I type "rm *" to delete the hidden files, it says "* not found". When I type "rmdir [file]" it says, "directory not empty". Is there something I can do to remove the inode? Any suggestions appreciated! I am on Unix Sys V rel2, vax 11/780. -- Steve Pearse ihnp4!hound!pearse
mac@tesla.UUCP (Michael Mc Namara) (03/06/85)
In article <957@hound.UUCP> pearse@hound.UUCP (S.PEARSE) writes: >I've got a good one for you unix wizards. Somehow (I don't know >how), the "dot" or "." file in one of my directories was removed. >I cannot read nor access anything in the directory as a result. >In fact, I cannot even remove the directory! Apparently, that >dot file was pretty darn important. > >Result is, I have a useless directory taking up disk space. >Question is, can someone tell me how to remove a directory with >no dot file. Better yet, can you tell me how to re-access the files >in that directory? When I type "rm *" to delete the hidden files, >it says "* not found". When I type "rmdir [file]" it says, >"directory not empty". Is there something I can do to remove >the inode? > >Any suggestions appreciated! I am on Unix Sys V rel2, vax 11/780. > > >-- >Steve Pearse >ihnp4!hound!pearse The thing to do is to get someone with the su password to write a program (much like mkdir itself) that will use the link(2) system call to link the directory, let us call it /usr/pearse/wasted, to /usr/pearse/wasted/. This should solve the problem (You need to be root to call link when linking to a directory) A C program to do this would be: main(){ link("/usr/pearse/wasted",/usr/pearse/wasted/."); } Of course, if all you want to do is remove the directory, that same su'er could just unlink it. -----------------------> mac@tesla.ARPA <--------------------------
mike@enmasse.UUCP (Mike Schloss) (03/13/85)
>> I've got a good one for you unix wizards. Somehow (I don't know >> how), the "dot" or "." file in one of my directories was removed. >> I cannot read nor access anything in the directory as a result. >> In fact, I cannot even remove the directory! Apparently, that >> dot file was pretty darn important. >> Is there something I can do to remove the inode? >> > The thing to do is to get someone with the su password to > write a program (much like mkdir itself) that will use the link(2) > system call to link the directory, let us call it /usr/pearse/wasted, > to /usr/pearse/wasted/. No, no, no. What you have there is a slightly corrupted file system. You know about one problem, how many dont you know about. If the fs isnt root then have your sys adm umount the filesys and run fsck. If the filesys is root then bring the machine down to single user, run fsck, and then bring it all back up. Mike Schloss
dave@inset.UUCP (Dave Lukes) (04/03/85)
The obvious way around the problem is to do: `/etc/link <dirname> <dirname>/.' as the super user. Love & kisses, Dave.