问题描述:
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����ʶ���