unlink(inode)? or how to remove file with '/' in its name

Conor P. Cahill cpcahil at virtech.uucp
Sun Oct 21 10:25:23 AEST 1990


In article <1990Oct20.182146.27039 at isis.cs.du.edu> cbrandau at 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 



More information about the Comp.unix.questions mailing list