Path: utzoo!mnetor!uunet!ncc!alberta!access!edm!news From: news@edm.UUCP (news software) Newsgroups: comp.unix.wizards Subject: Re: an rm question Message-ID: <1049@edm.UUCP> Date: 30 Apr 88 05:47:42 GMT References: <1080@mcgill-vision.UUCP> Organization: Unexsys Systems, Edmonton,AB. Lines: 33 From article <1080@mcgill-vision.UUCP>, by mouse@mcgill-vision.UUCP (der Mouse): > In article <142700029@occrsh.ATT.COM>, rjd@occrsh.ATT.COM writes: >> Does anyone have a program similar to "rm" that will remove a file >> based on filessystem and inode number? (AT&T System 5 release 2 or >> above...) > If you are the super-user (or at least have read access to the filesystem, then use ncheck(1 or 8). if /dev/rdsk0 were mounted as /usr2 then something along the lines of: for i over `ncheck -i 4432 /dev/rdsk0 ` do rm -f /usr2/$i done would remove all copies of inode 4432 from /usr2 . (I assume that there is a way to map file numbers to /dev names, but I'm too tired to figure that out right now). This is much cleaner than killing the inode and doing an fsck.. among other things: 1) you don't need to unmount the drive and 2) you don't need su privledges (OTHER THAN READ ACCESS TO THE SLICE). I consider having public read access to a disk slice a security hole, since it implies that anybody who really wants to can read any file on the slice. (just decode the file system) -- ------------- Stephen Samuel {ihnp4,ubc-vision,vax135}!alberta!edm!steve or userzxcv@uqv-mts.bitnet