Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site tesla.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!ihnp4!houxm!vax135!cornell!tesla!mac From: mac@tesla.UUCP (Michael Mc Namara) Newsgroups: net.unix Subject: Re: "dot" file deleted! Message-ID: <542@tesla.UUCP> Date: Tue, 5-Mar-85 22:52:05 EST Article-I.D.: tesla.542 Posted: Tue Mar 5 22:52:05 1985 Date-Received: Sat, 9-Mar-85 07:29:21 EST References: <161@sbcs.UUCP> <8565@brl-tgr.ARPA> <8566@brl-tgr.ARPA> <957@hound.UUCP> Reply-To: mac@tesla.UUCP (Michael Mc Namara) Organization: Cornell University, Electrical Engineering Dept. Lines: 37 Summary: 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 <--------------------------