转自: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 \;

相关文章:

  • 2021-05-21
  • 2022-12-23
  • 2022-12-23
  • 2021-11-21
  • 2021-08-24
  • 2021-05-24
  • 2021-07-07
猜你喜欢
  • 2021-09-13
  • 2021-08-13
  • 2021-05-27
  • 2021-10-20
  • 2021-06-29
  • 2022-12-23
相关资源
相似解决方案