an rm question

William E. Davidsen Jr davidsen at steinmetz.ge.com
Fri Apr 15 04:15:43 AEST 1988


One of the nice things about Korn shell is the 8 bit capability. I can
get evil names out by using something like this:
	fname=`echo "*\\0200*"`
			 ^^^ any octal code for a magic character
	rm $fname

I don't have Xenix source so I can't prove it's not brain damaged.  I
suspect that high bit files are like files starting with '.', and they
have to be explicitly named or they are ignored.  Try:

	mkdir expendable
	cd expendable
	date > .x
	date > y
	ls -la		# show .x and y
	rm *		# delete everything
	ls -la		# .x still there
	cd ..
	rm -r expendable # now the file goes away

  I don't have a virgin copy of BSD, but it works that way on Ultrix.
Now on Ultrix you can't create a file with the high bit set, at least
not easily. If you did I would bet it works the same way as '.' files,
so I think Xenix may be okay on this one.

  For international UNIX we need more than seven bits in a filename, so
if you disagree please use a new header, it's a separate topic.
-- 
	bill davidsen		(wedu at ge-crd.arpa)
  {uunet | philabs | seismo}!steinmetz!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me



More information about the Comp.unix.wizards mailing list