打赏
Fork me on GitHub

linux中删除文件名称乱码

在最近的操作中发现一些上传的文件有乱码,更改几次都无法正常转换到中文。下面给出正确的解决方案:

使用 ls -i 或者 ls -inum 查找出文件id号(红色字体)

[root@localhost home]# ls -i
260615 epel-release-latest-6.noarch.rpm 273780 test.txt
[root@localhost home]# ls -inum
273780 test.txt, 260615 epel-release-latest-6.noarch.rpm
[root@localhost home]#

 

结合find命令删除

[root@localhost home]# find -inum 273780 -exec rm -rf {} \;
[root@localhost home]# ls
epel-release-latest-6.noarch.rpm

删除成功

 

posted @ 2015-12-27 12:20  my_cool2007  阅读(301)  评论(0编辑  收藏  举报