LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 861|回复: 5

变态的不能删除??有生以来第一次出现!!

[复制链接]
发表于 2010-7-4 15:46:12 | 显示全部楼层 |阅读模式
用ls -al ant.jar 的时候竟然是这样的文件(root用户的)
ls: cannot access ant.jar: Permission denied
?????????? ? ? ? ? ? ant.jar

rm -rf ant.jar
一样会出现:
ls: cannot access ant.jar: Permission denied
现在只要有应用程序扫描到些jar包即马上出现死机了,晕了,有人遇到过这种情况吗
发表于 2010-7-4 18:13:15 | 显示全部楼层
我也碰到过乱码文件,X下的文件管理器和控制台(控制台下没法对应文件名)下都无法删除,最后用控制台下的文件管理器MC给删了
回复 支持 反对

使用道具 举报

发表于 2010-7-4 21:06:31 | 显示全部楼层
多半是文件名编码的问题。lz试试用convmv转码行不。
  1. $ convmv
  2. Your Perl version has fleas #22111 #37757 #49830
  3. convmv 1.14 - converts filenames from one encoding to another
  4. Copyright (C) 2003-2008 Bjoern JACKE <bjoern@j3e.de>

  5. This program comes with ABSOLUTELY NO WARRANTY; it may be copied or modified
  6. under the terms of the GNU General Public License version 2 or 3 as published
  7. by the Free Software Foundation.

  8. USAGE: convmv [options] FILE(S)
  9. [size=7][color="Red"]-f[/color][/size] enc     encoding *from* which should be converted
  10. [color="#ff0000"][size=7]-t[/size][/color] enc     encoding *to* which should be converted
  11. -r         recursively go through directories
  12. -i         interactive mode (ask for each action)
  13. --nfc      target files will be normalization form C for UTF-8 (Linux etc.)
  14. --nfd      target files will be normalization form D for UTF-8 (OS X etc.)
  15. --qfrom    be quiet about the "from" of a rename (if it screws up your terminal e.g.)
  16. --qto      be quiet about the "to" of a rename (if it screws up your terminal e.g.)
  17. --exec c   execute command instead of rename (use #1 and #2 and see man page)
  18. --list     list all available encodings
  19. --lowmem   keep memory footprint low (see man page)
  20. --nosmart  ignore if files already seem to be UTF-8 and convert if posible
  21. [color="#ff0000"][size=7]--notest[/size][/color]   actually do rename the files
  22. --replace  will replace files if they are equal
  23. --unescape convert%20ugly%20escape%20sequences
  24. --upper    turn to upper case
  25. --lower    turn to lower case
  26. --parsable write a parsable todo list (see man page)
  27. --help     print this help
复制代码

常用的选项就是上面三个。如果编码不对,它会给出提示,不会误操作
回复 支持 反对

使用道具 举报

发表于 2010-7-5 01:53:21 | 显示全部楼层
楼上两位,看清楚,那个不是乱码,那是ls -l看到的信息, 都是????????

通常,你把一个文件夹,cp -a到另一个地方(如U盘),你把U盘插到另一台机上,如果你那个文件夹有软连接, 但在另一台机上没有那个目的文件就会出现1楼的情况了。

不知道1楼是不是这样的情况。

如果是,拿回旧的电脑上把软连接删了就OK了,
如果真的有用,可以把 连接的位置记下,在新的电脑上重建,或者把连接拷成文件

还没试过其它的处理方法
回复 支持 反对

使用道具 举报

发表于 2010-7-18 11:45:58 | 显示全部楼层
首先确保文件系统本身是完整的,先检查一下
可以使用通配符加上-i参数来选择删除文件名有古怪的文件
还是权限不足的话再检查一下权限,最后看看是否启用了ACL权限
回复 支持 反对

使用道具 举报

发表于 2010-7-28 13:49:50 | 显示全部楼层
可以试试
#lsattr  ls -al ant.jar
#ls -Zl
看看ACL 和selinux 是否有异常
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表