Help! There's a slash '/' in my filename.

Donald Lashomb donlash at uncle.uucp
Sun Feb 3 15:11:29 AEST 1991


In article <11714 at helios.TAMU.EDU> n138ct at tamuts.tamu.edu (Brent Burton) writes:
=
=Thesummary line sez it.  I had problems before with mysterious
=control characters appearing in some file names as I typed them (due
=to the noisy phone lines).  
=
=  shouldn't something like:  rm "slash/file"
=  work OK?  The shell takes whatever is in quotes on the input line
=and passes it straight to the program's argv[n].  If the program
=uses this string value to manipulate the file, then maybe the string
=(and of course, the slash) are being passed to the FS manager of the
=kernel.  Would the FS then use the '/' to find the file?
=---
=Or another idea:
=   use     'rm -i *'  -- rm asks you before each file whether or not to
=delete it.  DON'T HOLD ME RESPONSIBLE FOR THIS.  CHECK YOUR LOCAL MAN
=PAGES BEFORE DOING THIS!
=
=---- I hope one of these ideas work...

I'm not a wizard, so anything I tell you here is only my best guess:

It's my understanding that the kernel itself disallows '/' in a filename,
so there's no way to get normal commands to accept it.  Try using ls -i
to get the inode # for the file, then (in single-user mode, or with the
filesystem umount'ed, or at least on a quiet system) use clri to remove
the inode followed by fsck to recover the (now unattached) data blocks.
Read your manuals carefully before trying this.

Don



More information about the Comp.unix.wizards mailing list