您的位置:首页 > 运维架构 > Linux

linux中删除文件名称乱码

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

使用 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

删除成功
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: