"dot" file deleted!
Michael Mc Namara
mac at tesla.UUCP
Wed Mar 6 13:52:05 AEST 1985
In article <957 at hound.UUCP> pearse at 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 at tesla.ARPA <--------------------------
More information about the Comp.unix
mailing list