Path: utzoo!utgpu!news-server.csri.toronto.edu!torsqnt!jtsv16!gerry From: gerry@jts.com (G. Roderick Singleton ) Newsgroups: comp.unix.admin Subject: Re: help removing a file Message-ID: <1990Sep15.195402.960@jts.com> Date: 15 Sep 90 19:54:02 GMT References: <1990Sep5.180847.21767@zaphod.mps.ohio-state.edu> <3812@se-sd.SanDiego.NCR.COM> Distribution: na Organization: JTS Computer Systems Ltd. Lines: 79 In article <3812@se-sd.SanDiego.NCR.COM> rns@se-sd.SanDiego.NCR.COM (Rick Schubert) writes: >In <1990Sep5.180847.21767@zaphod.mps.ohio-state.edu> harmon@function.mps.ohio-state.edu (Jim Harmon) writes: > >>Could someone someone help me with removing a file. On our system we have a >> [text deleted] > >I've seen about 6-8 follow-ups to this question, and none gave a very ... > >The most general solution is to execute (assuming you are in the directory >with the offending file): > rm -ri . > >Then `rm' will prompt you for each of the files in the current directory [rick's explanation deleted] > >I was surprised to see this question posted to comp.unix.admin, but I was >even more surprised at the poor quality of the answers. But I don't mean >to start a flamefest. > Perhaps, Rick; but I have a real problem. Directories which can not be removed, period. A solution for this would provide the guidelines needed by our juniour confreres and sure would save me from a newfs and restore. Some background, the system is a Sun 3/280 running SunOS 3.5.x and the faulty directories were inherited from my predecessor who claimed that sccs had a hand in their creation. I keep them in a directory named "BAD INODES" (yes there's a space in the name). Here's the result of ls -lai : BAD INODES: total 6 22610 drwxrwxr-x 3 root wheel 512 Sep 14 21:56 ./ 2 drwxrwxr-x 33 root wheel 1024 Sep 15 15:18 ../ 57369 drwxrwxrwx 5 root wheel 512 Aug 24 20:23 SCCS1.screwup/ 57369 drwxrwxrwx 5 root wheel 512 Aug 24 20:23 SCCS2.screwup/ 57369 drwxrwxrwx 5 root wheel 512 Aug 24 20:23 SCCS3.screwup/ 57369 drwxrwxrwx 5 root wheel 512 Aug 24 20:23 SCCS4.screwup/ By the looks of the above, a simple rmdir or rm -r should remove them BUT no go. Now Rick's method (rm -ir) produced the following: Script started on Sat Sep 15 15:19:21 1990 / >%[101] whoami root / >%[102] cd /usr/kumquat /usr/kumquat >%[103] rm -ri BAD\ INODES rm: remove directory BAD INODES/SCCS2.screwup? y rm: remove BAD INODES/SCCS2.screwup? y rm: BAD INODES/SCCS2.screwup not removed rm: remove directory BAD INODES/SCCS3.screwup? y rm: remove BAD INODES/SCCS3.screwup? y rm: BAD INODES/SCCS3.screwup not removed rm: remove directory BAD INODES/SCCS4.screwup? y rm: remove BAD INODES/SCCS4.screwup? y rm: BAD INODES/SCCS4.screwup not removed rm: remove directory BAD INODES/SCCS1.screwup? y rm: remove BAD INODES/SCCS1.screwup? y rm: BAD INODES/SCCS1.screwup not removed rm: remove BAD INODES? y rm: BAD INODES not removed /usr/kumquat >%[104] script done on Sat Sep 15 15:20:26 199 "Mv"'ing the directories first has also proved fruitless and I haven't had time to write a program to do the job and 'cause I don't know what made these directories non-removable in the first place. Fortunately, they use very little space. I will watch the group with great interest while I await your solutions. Flames? Send them to /dev/null. Thanks, ger -- G. Roderick Singleton, System and Network Manager, JTS Computers {yunexus | uunet | geac | torsqnt}!gerry@jtsv16.jts.com