linux文件名乱码时删除或改名的方式(转载)

时间:2014-06-11 12:13:39   收藏:0   阅读:311

转自:http://www.linuxsa.cn/when-linux-file-name-topsy-turvy-deleted-or-renamed.html

linux文件名乱码时删除或改名的方式

当......一堆......文件出现乱码时,你想用脚本把他们改名,结果又发现字符处理工具awk等都对这些玩意没有办法,无比蛋疼啊,怎么办泥,我有办法:
1.ls -i 查找到这些乱码文件的inode号,比如说2258820
2.find . -inum 2258820 -exec mv {} newname \; 用find命令对其改名或删除

[root@node4 ~]# ls -i
2258820 +?+?
[root@node4 ~]# find . -inum 2258786 -exec mv {} newname \;

linux文件名乱码时删除或改名的方式(转载),布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!