我无法删除备份副本的文件...我不记得它已经通过的所有文件系统字符集。删除文件中带有奇数字符的文件
不管怎么说,今天这里的文件:
nas# ls -al
ls: cannot access Sécurité: No such file or directory
total 32
drwx------ 4 sambacam sambacam 20480 Jun 5 01:38 .
drwxr-xr-x 3 sambacam sambacam 12288 Jun 5 01:38 ..
d????????? ? ? ? ? ? S??curit??
nas# cd S*
cd: 13: can't cd to Sécurité
nas# rm "Sécurité"
rm: cannot remove `S\303\251curit\303\251': No such file or directory
nas# rm S*
rm: cannot remove `S\303\251curit\303\251': No such file or directory
nas#
我甚至试过代码在Python没有成功:
nas# python
Python 2.5.2 (r252:60911, Jan 24 2010, 20:48:41)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> d=os.listdir('.')
>>> d
['S\xc3\xa9curit\xc3\xa9']
>>> d[0]
'S\xc3\xa9curit\xc3\xa9'
>>> os.remove(d[0])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 2] No such file or directory: 'S\xc3\xa9curit\xc3\xa9'
>>>
任何想法?
我已经运行fsck检查不一致性。
FS类型是ext2! – CamilleHuot 2011-06-05 09:02:46
你的语言环境是什么?尝试使用UTF-8(这是保持健全的唯一方法)。 – 2011-06-05 09:08:49
我的语言环境是POSIX,UTF8没有安装在我的电脑上。也许你是对的,文件名问题可以修复。 – CamilleHuot 2011-06-05 17:20:57