Ghost file

Brandon S. Allbery allbery at ncoast.UUCP
Fri Nov 25 05:09:39 AEST 1988


As quoted from <169 at pinn.UUCP> by sysop at pinn.UUCP (Andy Johnson):
+---------------
| In article <8430 at alice.UUCP>, debra at alice.UUCP (Paul De Bra) writes:
| > In article <17529 at adm.BRL.MIL> ZAT011%DJUKFA11.BITNET at cunyvm.cuny.edu (Thomas Heil) writes:
| > I would suspect that the name of the ghost file contains a non-printable
| > character, which doesn't show up when you try ls. A way to find out is
| > to make an octal dump of the directory.
| 
| You can also type in rm -i *   That will interactively ask you to delete
| each file including the ghost file.  
+---------------

Not always.  Line noise can create files with the 8th bit set in some
characters, and older shells without 8th-bit support will botch the
filenames, resulting in "rm: <filename> not found" or whatever.

My Q&D solution is to "ls -b" into a file, edit the file to generate a C
program with the filename hardcoded in it, and compile and run the program.
Dired also works for this, although the version we have on ncoast chokes on
directories that contain more than a few files.

++Brandon
-- 
Brandon S. Allbery, comp.sources.misc moderator and one admin of ncoast PA UN*X
uunet!hal.cwru.edu!ncoast!allbery  <PREFERRED!>	    ncoast!allbery at hal.cwru.edu
allberyb at skybridge.sdi.cwru.edu	      <ALSO>		   allbery at uunet.uu.net
comp.sources.misc is moving off ncoast -- please do NOT send submissions direct
      Send comp.sources.misc submissions to comp-sources-misc@<backbone>.



More information about the Comp.unix.wizards mailing list