[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Need to remove a ghost file, but can't because it doesn't exist



On 2006-11-15 @ 16:35:28 (week 46) Matthew Krauss wrote:

> I'm thinking you have a file with a name that the shell doesn't want to 
> handle correctly.

As far as I can tell, there's nothing irregular about the name itself.
The only somewhat "special" characters in it are a comma, an equal sign
and a colon. All other files in the same directory do contain those too
without showing any problems.
 
> Try these:
> # echo 1141914051.*

$ echo 1141914051.*
1141914051.M484859P8695V0000000000000309Ip0007553_0.draupnir,S=3707:2,S

> # ls | grep 1141914051

$ ls | grep 1141914051
1141914051.M484859P8695V0000000000000309Ip0007553_0.draupnir,S=3707:2,S
 
> See if the file is shown.

It is.

> My guess is you will get two different results.
> 
> Try using rm with the full file name from the second command 
> (copy and past is your friend here) in quotes.

Already tried that:

$ rm '1141914051.M484859P8695V0000000000000309Ip0007553_0.draupnir,S=3707:2,S'
rm: cannot lstat `1141914051.M484859P8695V0000000000000309Ip0007553_0.draupnir,S=3707:2,S': No such file or directory
 
> (Assuming here that only one file matches that glob pattern.  Otherwise 
> that won't work so well.)

There's only one matching file.

> The filename could (hypothetically) also screw with your terminal... 
> Another approach would be to type "rm 1141914051." and then hit your tab 
> key, see if the name auto-completes.

I don't think the problem is in the name or the shell's intepretation of
it. I am getting a bad feeling the problem is more low-level, like in
the filesystem.
 
> If this doesn't work you might want to try using a file manager to 
> remove the file.

This is on a host without X, but mc couldn't handle it either.

> If that doesn't work, I would suggest that a fsck might be in order.

I am coming to that conclusion as well.

Thank you for your effort, much appreciated!

Grx HdV




Reply to: