bad filenames

David Goodenough dg at lakart.UUCP
Fri May 13 00:07:59 AEST 1988


>From article <10777 at steinmetz.ge.com>, by davidsen at steinmetz.ge.com (William E. Davidsen Jr):
> Is there a better way to get rid of a file with a '/' in the name
> than diddling the directory? "rm -i *" sure doesn't work here!

Since this is a UNIX (tm) group I'm going to ask "how was a file with a '/'
in it's name created?" I *_CANT_* do it here (BSD 4.3).

And regarding it's removal, "rm -i *" will fail because * expands, and
rm gets a name with a '/' in it, so unlink(2) starts looking for sub-
directories. Even an "rm -ir ." may well fail, because the string that
gets handed to unlink(2) (and presumably namei()) still has a '/' in it.

(If this is a SYS V problem then some of what I have said may be wrong -
I have never worked with SYS V - just BSD 4.X)
-- 
	dg at lakart.UUCP - David Goodenough		+---+
							| +-+-+
	....... !harvard!adelie!cfisun!lakart!dg	+-+-+ |
						  	  +---+



More information about the Comp.unix.questions mailing list