Confused file name in directory

m5d at bobkat.UUCP m5d at bobkat.UUCP
Fri Feb 27 00:25:01 AEST 1987


In article <2136 at ptsfa.UUCP> ssl at ptsfa.UUCP (Sam Lok) writes:
>But as a last to the last resort, if you don't really want to get rid
>of things, I'll try this before 'clri':
>	1. make sure there's only one directory and/or filename start
>	   with D
>	2. then 'mv D* goodname'
>Didn't try this with D\0a though, this might/might not work, but doesn't
>hurt give it a try before earsing everything.  As long as D* expands into
>one name, mv will work.
>
>Sam Lok		San Francisco		{ihnp4,pyramid,qantel}!ptsfa!ssl

I don't think this will work (I don't want to screw up a directory to
find out).  I can't think of any way that ANY program (other than the
"clri" and "fsck" method mentioned previously) that can get rid of this
file.  The problem is that a string must be passed to unlink() (or
rename()).  Assuming you can get a pathname with a null in it through
the shell into some utility, it will have to call this routine which of
course will consider the null to be the end of the pathname.

If anybody can think of a solution (other than zapping the inode
directly; I know that will work) it would interest me.  (There's no way
to write into a directory, right?)
-- 
Mike McNally, mercifully employed at Digital Lynx ---
    Where Plano Road the Mighty Flood of Forest Lane doth meet,
    And Garland fair, whose perfumed air flows soft about my feet...
uucp: {texsun,killer,infotel}!pollux!bobkat!m5d (214) 238-7474



More information about the Comp.unix.questions mailing list