Path: utzoo!attcan!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.unix.questions Subject: Re: unlink(inode)? or how to remove file with '/' in its name Message-ID: <1990Oct21.002523.27266@virtech.uucp> Date: 21 Oct 90 00:25:23 GMT References: <1990Oct18.030832.10894@melb.bull.oz.au> <1990Oct20.182146.27039@isis.cs.du.edu> Reply-To: cpcahil@virtech.UUCP (Conor P. Cahill) Organization: Virtual Technologies Inc., Sterling VA Lines: 17 In article <1990Oct20.182146.27039@isis.cs.du.edu> cbrandau@isis.UUCP (carl brandauer) writes: >First, why write a C program when 'ls -i' will return the inumber (NOT inode) >of the file. Once you have the inumber (say nnn), > > find . -inum nnn -exec rm {} \; > >will do what you need. No it won't. The problem with a filename that has a '/' in it is that there is no way to access that file because the low level kernel routines interpret the '/' as a directory separator. -- Conor P. Cahill (703)430-9247 Virtual Technologies, Inc., uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160 Sterling, VA 22170