bad filenames

Thomas Truscott trt at rti.UUCP
Thu May 12 01:50:31 AEST 1988


> Is there a better way to get rid of a file with a '/' in the name
> than diddling the directory? "rm -i *" sure doesn't work here!

Fixing filesystem corruption is a job for fsck,
which could strip '/'s from directory entries.
(It could also ensure that only '\0' characters follow the file name.)
Unfortunately, I do not think any current fsck does that.
This is fixed in 4.4 BSD, right?

While you are waiting for your 4.4 BSD tapes to arrive
I recommend you create a new directory, "mv" everything from the old
to the new directory (except the badly-named file which will not move),
and then unmount the filesystem and "clri" the old directory.
If you are lucky fsck will put the formerly-badly-named file in lost+found.
	Tom Truscott



More information about the Comp.unix.questions mailing list