faustus (02/15/83)
The easy thing to do would be to do 'see .'. You should be able to find out what you filename really is. Or maybe even 'ls | see'. Wayne
smk (02/15/83)
What I do is to do a: od -bc . which is nice (until 4.2bsd) because each directory entry takes up 1 line. Based on this, if I have to, I write a 1-liner that unlink's the name. A bit of a pain, but the shell and rm don't like all ASCII.
tcb (02/16/83)
For those systems not running ucb unix - the standard od (octal dump) command with a -c option can be used to dump the directory. This will give you octal representations of any unprintable characters. Then of course you've got to figure out which control characters these are so you can type in the string to the rm command. Alternatively, why not pick any of the readable characters and use rm in the interactive mode? i.e.: rm -i *A* For files you want to keep enter 'n', and hope- fully rm will come across the offending file and you can type 'y' and then quit.
haight (02/17/83)
There is a UN*X utility that will remove any old name (but the usage is ugly and the method can be slow for a file poised above a deep directory sub-tree): find . -name '<correct number of "?" for file name match>' \ -ok rm {} \; The trick is that find doesn't use the shell to exec rm.
dave (02/18/83)
Why not use dsw? That will let you remove any file in the directory. What's that you say? You don't have version 6 UNIX any more? And you thought v7 was progress?? Not afraid to continue running v6 (on our aging 11/45) Dave Sherman, Toronto utcsrgv!dave
san (02/18/83)
Seeing as we had a similar problem using our 4.1BSD system, I thought I'd throw in my two cents worth... some systems allowed the creation of a file with characters having the most-significant bit turned on (ala 0200). Unfortunately, but logically (?) so, it seems that all programs that deal with directories make SURE to turn off that MSB, so (for example) you can get ``rm -i'' to print a vague resemblence of the files name, but upon approving removal of it, ``rm'' will complain strenously to the tune of ``file non-existent'', or some such error. I have been unfortunate enough to come across this problem on both a 4.1BSD system and a V7M system, The fix for all of this has probably been published, so I hesitate to take up more space, but just in case........ On 4.1BSD there is a one or two line fix in the kernel to ``chr &= 0177'' when creating a file. As far as V7M, I haven't tried, though I would imagine it would be similar. The quick/dirty solution is to change/create a program to run through the named directory, accepting a filename WITH the MSB on, and attempt to remove it Fortunately the system will accept those filenames as arguments to ``unlink''. Note that I had no luck trying to match the characters with meta-characters, no one knows/cares about the MSB on a filenames characters. If anyone wants the fix to a 4.1BSD kernel, I'll be happy to send them a copy and/or where it goes Steve Sanderson ...!nbires!ut-ngp!san san@utexas-11 P.s. this assumes that you DON'T want MSB's to be able to be turned on.