0

I found a file named '.|rst412slp10lad10_noTopo.png', and I really want to remove this. what should I do?

I tried to use ls -al to get the info of the file then I got this:

ls: cannot access '.|rst412slp10lad10_noTopo.png': No such file or directory
total 0
drwxrwxrwx 1 jinshengye jinshengye 4096 Jun  5 17:10 .
drwxrwxrwx 1 jinshengye jinshengye 4096 Jun  5 16:58 ..
-????????? ? ?          ?             ?            ? .|rst412slp10lad10_noTopo.png

What should I do?

halfer
  • 19,824
  • 17
  • 99
  • 186
Kylxyz
  • 29
  • 9
  • This is a common FAQ, but it is not suitable for Stack Overflow. Try searching for similar questions on [unix.se] or [su] – tripleee Jun 06 '18 at 04:15
  • all right, may I delete this post? – Kylxyz Jun 06 '18 at 04:47
  • When there are multiple answers, you can't any longer. https://meta.stackexchange.com/questions/5221/how-does-deleting-work-what-can-cause-a-post-to-be-deleted-and-what-does-that – tripleee Jun 06 '18 at 04:50

2 Answers2

0

Find the inode number(s) with

ls -li

And remove it with

find . -inum 1234 -delete
FBergo
  • 1,010
  • 8
  • 11
  • Thanks for replying, however it does not work. I tried `ls -li`, it gives `total 0`.... – Kylxyz Jun 06 '18 at 01:57
  • Then your problem is not a regular file with a weird name, but probably a corrupted filesystem. You should run a tool like `fsck` (if this is Linux) or Windows's ChkDsk, depending on the platform / filesystem you have. – FBergo Jun 06 '18 at 02:01
  • I tried `chkdsk \f \r \x`, it gives a long list: `Stage 1: Examining basic file system structure ... ... Stage 2: Examining file name linkage ... ... Deleted invalid filename .|rst412slp10lad10_noTopo.png (6DEA5) in directory 6DAC5. ... Deleting index entry .|rst412slp10lad10_noTopo.png in index $I30 of file 6DAC5. ... Stage 3: Examining security descriptors ... ... Stage 4: Looking for bad clusters in user file data ... Progress: 0 of 2317642 done; Stage: 0%; Total: 0%; ETA: 696:06:01 ..`, it costs long time.. I will give you feed back, many thx – Kylxyz Jun 06 '18 at 02:26
  • it works, the file was removed. Thx a lot – Kylxyz Jun 06 '18 at 04:45
0

OK you can try deleting with quotes

rm ".|rst412slp10lad10_noTopo.png"

but that probably won't work, you may need to set rights and /or reboot (or more)... Have a look at this:

https://serverfault.com/questions/65616/question-marks-showing-in-ls-of-directory-io-errors-too?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

Mike Q
  • 6,716
  • 5
  • 55
  • 62