Accessing files by inode #s

Bernie Hoffstadt cutter at cutsys.UUCP
Mon Feb 1 04:35:52 AEST 1988


In article <11470 at brl-adm.ARPA> iunix1 at 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 at CS.ORST.EDU
1437 N.W. 9th st.   -or- 753-1646 ***   -or-    cutter at jacobs.CS.ORST.EDU
Corvallis, Oregon  97330  ****** UUCP: {tektronix,hp-pcd}!orstcs!cutsys!cutter 



More information about the Comp.unix.questions mailing list