Summary of how to remove file with NULL names

Jeffrey W Percival jwp at uwmacc.UUCP
Thu Apr 24 03:21:53 AEST 1986


In article <306 at chinet.UUCP> megabyte at chinet.UUCP (Mark E. Sunderlin) writes:
>Here is the consensis of the net on how to remove files with
>strange and weird characters in their names.
>
>uokmet!kwthomas,mtgzy!ecl,necis!geo,pegasus!hansen,BRL.ARPA!gwyn
>jplgodo!steve ,and Robert Sanford whose address I lost in
>the depths of vi and lines over 80 columns long.
>
>>The files have characters over \177 (decimal = 127) in them.
>>Here is a program that uses the "unlink" system call to remove
>>files with funky names.

I didn't see the original posting, but this does NOT work in 2.8BSD.
I had many such files created by a user doing a "split -2" on a
many thousand line file thinking it would result in 2 files, not
many 2-line files, and split merrily created files with bizarre names.
The *only* thing that worked was doing a clri on each file, then
doing a filecheck to clean things up.  I even ran a program that
opened and read the directory file, to make sure that the argument
to unlink() was *exactly* right, but to no avail.

Just thought you'd like to know.

p.s. Many thanks to all the folks who advised me on this problem last year...
-- 
	Jeff Percival ...!uwvax!uwmacc!jwp



More information about the Comp.unix.wizards mailing list