Linux系统下_拷贝下载windows文件_出现linux文件名乱码
2021/11/12 7:09:41
本文主要是介绍Linux系统下_拷贝下载windows文件_出现linux文件名乱码,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
问题描述:
1.下载下来压缩包解压之后,文件名出现乱码,文件内容是正常的
-rw-rw-r-- 1 kql kql 39085 12月 16 2019 10.·ÇÏßÐԻعé.ipynb -rw-rw-r-- 1 kql kql 6205 12月 16 2019 13.mnistÊý¾Ýʶ±ð¼òµ¥³ÌÐò.ipynb -rw-rw-r-- 1 kql kql 6322 12月 16 2019 15.mnistÊý¾Ýʶ±ð-½»²æìØ.ipynb -rw-rw-r-- 1 kql kql 7895 12月 16 2019 17.mnistÊý¾Ýʶ±ð-²»ÓÃDropout.ipynb -rw-rw-r-- 1 kql kql 7855 12月 16 2019 17.mnistÊý¾Ýʶ±ð-Dropout.ipynb -rw-rw-r-- 1 kql kql 7939 12月 16 2019 17.mnistÊý¾Ýʶ±ð-ÕýÔò»¯.ipynb -rw-rw-r-- 1 kql kql 6630 12月 16 2019 18.mnistÊý¾Ýʶ±ð-AdamÓÅ»¯Æ÷.ipynb -rw-rw-r-- 1 kql kql 8331 12月 26 2019 23.mnistÊý¾Ýʶ±ð-¾í»ýÉñ¾ÍøÂç.ipynb -rw-rw-r-- 1 kql kql 7945 12月 26 2019 28.mnistÊý¾Ýʶ±ð-LSTM.ipynb -rw-rw-r-- 1 kql kql 5988 12月 26 2019 29.Ä£Ðͱ£´æ.ipynb -rw-rw-r-- 1 kql kql 5832 12月 26 2019 29.Ä£ÐÍÔØÈë.ipynb drwx------ 3 kql kql 0 6月 4 2020 30-31ͼÏñʶ±ð/ -rw-rw-r-- 1 kql kql 3653 12月 7 2019 3.tensorµÄÊôÐÔ.ipynb -rw-rw-r-- 1 kql kql 8179 12月 7 2019 4.Êý¾ÝÉú³É.ipynb -rw-rw-r-- 1 kql kql 8983 12月 7 2019 5.»ù±¾ÔËËã²Ù×÷1.ipynb -rw-rw-r-- 1 kql kql 4741 12月 7 2019 6.»ù±¾ÔËËã²Ù×÷2.ipynb -rw-rw-r-- 1 kql kql 3473 12月 7 2019 7.Êý¾ÝµÄË÷Òý.ipynb -rw-rw-r-- 1 kql kql 4576 12月 7 2019 8.×Ô¶¯Çóµ¼.ipynb -rw-rw-r-- 1 kql kql 30487 12月 14 2019 9.ÏßÐԻعé.ipynb
2.原文件名的编码也是utf8......
执行convmv -r -f gbk -t utf8 * 文件名转换之前的测试(这里预判文件名为gbk编码)
结果,文件名也是utf-8的,具体原因不知,有可能是en_us.utf8和zh_cn.utf8的区别,
系统默认使用的en_us.utf8字符集
Skipping, already UTF-8......
$ convmv -r -f gbk -t utf8 * Starting a dry run without changes... Skipping, already UTF-8: ./10.·ÇÏßÐԻعé.ipynb Skipping, already UTF-8: ./13.mnistÊý¾Ýʶ±ð¼òµ¥³ÌÐò.ipynb Skipping, already UTF-8: ./15.mnistÊý¾Ýʶ±ð-½»²æìØ.ipynb Skipping, already UTF-8: ./17.mnistÊý¾Ýʶ±ð-²»ÓÃDropout.ipynb Skipping, already UTF-8: ./17.mnistÊý¾Ýʶ±ð-Dropout.ipynb Skipping, already UTF-8: ./17.mnistÊý¾Ýʶ±ð-ÕýÔò»¯.ipynb Skipping, already UTF-8: ./18.mnistÊý¾Ýʶ±ð-AdamÓÅ»¯Æ÷.ipynb Skipping, already UTF-8: ./23.mnistÊý¾Ýʶ±ð-¾í»ýÉñ¾ÍøÂç.ipynb Skipping, already UTF-8: ./28.mnistÊý¾Ýʶ±ð-LSTM.ipynb Skipping, already UTF-8: ./29.Ä£Ðͱ£´æ.ipynb Skipping, already UTF-8: ./29.Ä£ÐÍÔØÈë.ipynb Skipping, already UTF-8: 30-31ͼÏñʶ±ð/30.ÏîĿʵս-è¹··ÖÀà_cnn.ipynb Skipping, already UTF-8: 30-31ͼÏñʶ±ð/30.ÏîĿʵս-è¹··ÖÀà_fc.ipynb Skipping, already UTF-8: 30-31ͼÏñʶ±ð/31.ÏîĿʵս-è¹··ÖÀàÔ¤²â³ÌÐò.ipynb Skipping, already UTF-8: ./30-31ͼÏñʶ±ð Skipping, already UTF-8: ./3.tensorµÄÊôÐÔ.ipynb Skipping, already UTF-8: ./4.Êý¾ÝÉú³É.ipynb Skipping, already UTF-8: ./5.»ù±¾ÔËËã²Ù×÷1.ipynb Skipping, already UTF-8: ./6.»ù±¾ÔËËã²Ù×÷2.ipynb Skipping, already UTF-8: ./7.Êý¾ÝµÄË÷Òý.ipynb Skipping, already UTF-8: ./8.×Ô¶¯Çóµ¼.ipynb Skipping, already UTF-8: ./9.ÏßÐԻعé.ipynb No changes to your files done. Would have converted 0 files in 0 seconds. Use --notest to finally rename the files.
解决:
首先,安装一下文件名编码转换工具convmv
sudo apt install convmv
第一步,先把文件名从utf8转换到iso88591
执行:convmv -r -f utf8 -t iso88591 * --notest
$ convmv -r -f utf8 -t iso88591 * --notest mv "./10.·ÇÏßÐԻعé.ipynb" "./10.�����Իع�.ipynb" mv "./13.mnistÊý¾Ýʶ±ð¼òµ¥³ÌÐò.ipynb" "./13.mnist����ʶ���
这篇关于Linux系统下_拷贝下载windows文件_出现linux文件名乱码的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-23linux 系统宝塔查看网站访问的命令是什么?-icode9专业技术文章分享
- 2024-11-12如何创建可引导的 ESXi USB 安装介质 (macOS, Linux, Windows)
- 2024-11-08linux的 vi编辑器中搜索关键字有哪些常用的命令和技巧?-icode9专业技术文章分享
- 2024-11-08在 Linux 的 vi 或 vim 编辑器中什么命令可以直接跳到文件的结尾?-icode9专业技术文章分享
- 2024-10-22原生鸿蒙操作系统HarmonyOS NEXT(HarmonyOS 5)正式发布
- 2024-10-18操作系统入门教程:新手必看的基本操作指南
- 2024-10-18初学者必看:操作系统入门全攻略
- 2024-10-17操作系统入门教程:轻松掌握操作系统基础知识
- 2024-09-11Linux部署Scrapy学习:入门级指南
- 2024-09-11Linux部署Scrapy:入门级指南