Funny filenames: so far, no good... (2.9BSD)

Steven List sml at luke.UUCP
Sun Jun 2 10:37:18 AEST 1985


> 
> I've had a number of responses on how to remove the file whose name is
> 	\t 360 200 035 002 \0
> but no one has won yet.  Most people recommended using unlink(2) like this:
> 
[...]
> That failed too.  Holy filename, Batman!  What next?
> 
> -- 
> 	Jeff Percival ...!uwvax!uwmacc!jwp

Please forgive my ignorance: we're running SYSIII, and there's a nifty
utility called fsdb.  While I don't profess to proficiency in its use, I
have used it in both similar and dissimlar instances.  Does something
like it exist in 2.9BSD?

My worst, and most challenging, case involved an infinitely recursive
directory.  The directory looked something like this when printed with
od -c .:

0000000 nnn nnn   .  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000020 mmm mmm   .   .  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000040 nnn nnn   s   o   m   e   f   i   l   e  \0  \0  \0  \0  \0  \0
0000060 nnn nnn   s   o   m   e   f   i   l   e   1  \0  \0  \0  \0  \0
0000100 nnn nnn   s   o   m   e   f   i   l   e   2  \0  \0  \0  \0  \0

where there were three files with the same inode number as the directory
file itself.  The ls command went bananas, especially with the -R
option.  The du command went off into lalaland.  At first the only
option appeared to be dumping and reloading the file system.  I
realized, however, that these same damn inodes would get dumped and
reloaded.  The rm command kept saying that the files were directories,
and the rmdir (or rm -rf) command said the directory wasn't empty!

Finally I tried fsdb.  Worked like a charm!!!  It does take a little
figuring out, but it works wonders.  If anyone has a reasonable tutorial
for using fsdb out there, I would love to see it.



More information about the Comp.unix mailing list