lampman@heurikon.UUCP (Ray Lampman) (01/05/89)
I created a few hard-linked directories on a sun3 work station and, now, can't find any way to remove them. All of the directories are empty. {shell-prompt} ls -alig total 7 25622 drwxrwxr-x 4 lampman users 512 Dec 29 12:03 . 35290 drwxr-xr-x 8 lampman users 512 Jan 4 16:03 .. 36487 drwxrwxr-x 3 lampman users 1024 Dec 29 11:54 xx.0 36487 drwxrwxr-x 3 lampman users 1024 Dec 29 11:54 xx.1 7377 drwxrwxr-x 4 lampman users 1024 Dec 29 11:59 yy.0 7377 drwxrwxr-x 4 lampman users 1024 Dec 29 11:59 yy.1 7377 drwxrwxr-x 4 lampman users 1024 Dec 29 11:59 yy.2 Even root execution of rm and rmdir fails. Am I missing some obscure option to rm or rmdir? I've exausted my local resources, I think. Then again, I may just be blind. I hope not. :-) Thanks in advance, Ray. -- I am seriously considering a career on | Ray Lampman (608) 276-3431 the beach. I'll need a microwave modem, | Madison Wisconsin USA Earth solar power supply, and a little shade. | {husc6,rutgers}!uwvax!heurikon!lampman
debra@alice.UUCP (Paul De Bra) (01/06/89)
In article <287@heurikon.UUCP> lampman@heurikon.UUCP (Ray Lampman) writes: >I created a few hard-linked directories on a sun3 work station and, now, >can't find any way to remove them. All of the directories are empty. >... >Even root execution of rm and rmdir fails. Am I missing some obscure >option to rm or rmdir? I've exausted my local resources, I think. Then >again, I may just be blind. I hope not. :-) Thanks in advance, Ray. Fsck never liked hard-linked directories... So you should never create them. Some Unix systems luckily have a program /etc/unlink which should be able to unlink anything that the unlink system call can unlink. (I think you need /etc/link to create these bogus hard links too, anyway, it used to be that way on an old System III system I once used.) Paul. -- ------------------------------------------------------ |debra@research.att.com | uunet!research!debra | ------------------------------------------------------
jcm@mtunb.ATT.COM (was-John McMillan) (01/06/89)
In article <287@heurikon.UUCP> lampman@heurikon.UUCP (Ray Lampman) writes: >I created a few hard-linked directories on a sun3 work station and, now, >can't find any way to remove them. All of the directories are empty. ... >36487 drwxrwxr-x 3 lampman users 1024 Dec 29 11:54 xx.0 >36487 drwxrwxr-x 3 lampman users 1024 Dec 29 11:54 xx.1 > 7377 drwxrwxr-x 4 lampman users 1024 Dec 29 11:59 yy.0 > 7377 drwxrwxr-x 4 lampman users 1024 Dec 29 11:59 yy.1 > 7377 drwxrwxr-x 4 lampman users 1024 Dec 29 11:59 yy.2 I. I tried E-mailing to you, but was refused. Apologies to other readers. II The following are just suggestions -- your best advice will come from a SUN guru. III In the old, Version-6 days -- circa 10 years ago -- a typical hacker's procedure might have involved: 1) Take your system to Single-User mode; 2) "cd" to "/"; 3) Dismount all your disks and properly shutdown any daemons and unrequired tasks; 4) Use "/etc/clri" to ZERO-out the inodes: clri {RAW-filesystemname} 36487 7377 5) reboot: 5a) -- if the repairs were on ROOTDEV, then force a REBOOT-WITHOUT-SYNC and let FSCK fix it up. 5b) -- otherwise: host the party yourself and control FSCK: fsck {RAW-filesystemname} 5c) -- otherwise: reboot gracefully, and let FSCK fix it up. ************************************************************** ** CAVEAT: READ your manuals until you understand the above.** ** I am providing a suggestion I WOULD PERFORM, but NOT ** ** necessarily one YOU SHOULD PERFORM. ** ************************************************************** Your system should provide a better way, if it's going to allow linked directories (yetch). JC McMillan -- att!mtunb!jcm -- just muttering a PERSONAL opinion...