Path: utzoo!utgpu!water!watmath!clyde!rutgers!orstcs!cutsys!cutter From: cutter@cutsys.UUCP (Bernie Hoffstadt ) Newsgroups: comp.unix.questions Subject: Re: Accessing files by inode #s Summary: use find -inum Keywords: Microport Find Message-ID: <280@cutsys.UUCP> Date: 31 Jan 88 18:35:52 GMT References: <11470@brl-adm.ARPA> Reply-To: cutter@cutsys.UUCP (Bernie Hoffstadt (753-1646)) Organization: Garfield's Litterbox - Corvallis, Ore. Lines: 34 In article <11470@brl-adm.ARPA> iunix1@almsa-1.arpa (Will Martin) writes: >Is there some trick I just don't know that would allow me to refer to a >file by its inode # in performing otherwise-ordinary UNIX commands, >like "cp" or "rm"? Or have people written special commands that will do >this sort of thing? I was SURE there was an option to find for matching a file with a certain inode number, but my runtime manual for Microport SystemV v2.2 didn't show it. Checking the manual for our old Xenix 1.00.02 system (Version 7), I found that the option is called -inum, and also works on my Microport system. Will could cd to the offending directory which has this output from ls -li 345 -rw-rw-r-- 1 iunix1 local 44 Jan 24 06:44 @#$ _!!*Y etc... and do find . -inum 345 -ok rm {} \; ****************** ***** NOTICE ***** ****************** Since my manual did not document the -inum option, and the manual is essentially a reprint of the generic AT&T SystemV manual, it's conceivable that other manuals don't have it either. Check your manual, and if it's not there, see if the option works. If it does, add it and let your O/S maker know. -- Bernie Hoffstadt (503) 752-5929 *** Internet: cutter%cutsys.UUCP@CS.ORST.EDU 1437 N.W. 9th st. -or- 753-1646 *** -or- cutter@jacobs.CS.ORST.EDU Corvallis, Oregon 97330 ****** UUCP: {tektronix,hp-pcd}!orstcs!cutsys!cutter