我無法刪除備份副本的文件...我不記得它已經通過的所有文件系統字符集。刪除文件中帶有奇數字符的文件
不管怎麼說,今天這裏的文件:
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