IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 系统运维 -> Linux系统下_拷贝下载windows文件_出现linux文件名乱码 -> 正文阅读

[系统运维]Linux系统下_拷贝下载windows文件_出现linux文件名乱码

问题描述:

1.下载下来压缩包解压之后,文件名出现乱码,文件内容是正常的

-rw-rw-r-- 1 kql kql 39085 12月 16  2019 10.·???D???1é.ipynb
-rw-rw-r-- 1 kql kql  6205 12月 16  2019 13.mnistêy?Yê?±e?òμ¥3ìDò.ipynb
-rw-rw-r-- 1 kql kql  6322 12月 16  2019 15.mnistêy?Yê?±e-??2?ì?.ipynb
-rw-rw-r-- 1 kql kql  7895 12月 16  2019 17.mnistêy?Yê?±e-2?ó?Dropout.ipynb
-rw-rw-r-- 1 kql kql  7855 12月 16  2019 17.mnistêy?Yê?±e-Dropout.ipynb
-rw-rw-r-- 1 kql kql  7939 12月 16  2019 17.mnistêy?Yê?±e-?y?ò?ˉ.ipynb
-rw-rw-r-- 1 kql kql  6630 12月 16  2019 18.mnistêy?Yê?±e-Adamó??ˉ?÷.ipynb
-rw-rw-r-- 1 kql kql  8331 12月 26  2019 23.mnistêy?Yê?±e-?í?yé??-í???.ipynb
-rw-rw-r-- 1 kql kql  7945 12月 26  2019 28.mnistêy?Yê?±e-LSTM.ipynb
-rw-rw-r-- 1 kql kql  5988 12月 26  2019 29.?£Dí±£′?.ipynb
-rw-rw-r-- 1 kql kql  5832 12月 26  2019 29.?£Dí??è?.ipynb
drwx------ 3 kql kql     0 6月   4  2020 30-31í???ê?±e/
-rw-rw-r-- 1 kql kql  3653 12月  7  2019 3.tensorμ?ê?D?.ipynb
-rw-rw-r-- 1 kql kql  8179 12月  7  2019 4.êy?Yéú3é.ipynb
-rw-rw-r-- 1 kql kql  8983 12月  7  2019 5.?ù±?????2ù×÷1.ipynb
-rw-rw-r-- 1 kql kql  4741 12月  7  2019 6.?ù±?????2ù×÷2.ipynb
-rw-rw-r-- 1 kql kql  3473 12月  7  2019 7.êy?Yμ??÷òy.ipynb
-rw-rw-r-- 1 kql kql  4576 12月  7  2019 8.×??ˉ?óμ?.ipynb
-rw-rw-r-- 1 kql kql 30487 12月 14  2019 9.??D???1é.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.·???D???1é.ipynb
Skipping, already UTF-8: ./13.mnistêy?Yê?±e?òμ¥3ìDò.ipynb
Skipping, already UTF-8: ./15.mnistêy?Yê?±e-??2?ì?.ipynb
Skipping, already UTF-8: ./17.mnistêy?Yê?±e-2?ó?Dropout.ipynb
Skipping, already UTF-8: ./17.mnistêy?Yê?±e-Dropout.ipynb
Skipping, already UTF-8: ./17.mnistêy?Yê?±e-?y?ò?ˉ.ipynb
Skipping, already UTF-8: ./18.mnistêy?Yê?±e-Adamó??ˉ?÷.ipynb
Skipping, already UTF-8: ./23.mnistêy?Yê?±e-?í?yé??-í???.ipynb
Skipping, already UTF-8: ./28.mnistêy?Yê?±e-LSTM.ipynb
Skipping, already UTF-8: ./29.?£Dí±£′?.ipynb
Skipping, already UTF-8: ./29.?£Dí??è?.ipynb
Skipping, already UTF-8: 30-31í???ê?±e/30.????êμ??-?¨1··?àà_cnn.ipynb
Skipping, already UTF-8: 30-31í???ê?±e/30.????êμ??-?¨1··?àà_fc.ipynb
Skipping, already UTF-8: 30-31í???ê?±e/31.????êμ??-?¨1··?àà?¤2a3ìDò.ipynb
Skipping, already UTF-8: ./30-31í???ê?±e
Skipping, already UTF-8: ./3.tensorμ?ê?D?.ipynb
Skipping, already UTF-8: ./4.êy?Yéú3é.ipynb
Skipping, already UTF-8: ./5.?ù±?????2ù×÷1.ipynb
Skipping, already UTF-8: ./6.?ù±?????2ù×÷2.ipynb
Skipping, already UTF-8: ./7.êy?Yμ??÷òy.ipynb
Skipping, already UTF-8: ./8.×??ˉ?óμ?.ipynb
Skipping, already UTF-8: ./9.??D???1é.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.·???D???1é.ipynb"	"./10.�����??�.ipynb"
mv "./13.mnistêy?Yê?±e?òμ¥3ìDò.ipynb"	"./13.mnist����?���򵥳���.ipynb"
mv "./15.mnistêy?Yê?±e-??2?ì?.ipynb"	"./15.mnist����?��-������.ipynb"
mv "./17.mnistêy?Yê?±e-2?ó?Dropout.ipynb"	"./17.mnist����?��-����Dropout.ipynb"
mv "./17.mnistêy?Yê?±e-Dropout.ipynb"	"./17.mnist����?��-Dropout.ipynb"
mv "./17.mnistêy?Yê?±e-?y?ò?ˉ.ipynb"	"./17.mnist����?��-������.ipynb"
mv "./18.mnistêy?Yê?±e-Adamó??ˉ?÷.ipynb"	"./18.mnist����?��-Adam�?���.ipynb"
mv "./23.mnistêy?Yê?±e-?í?yé??-í???.ipynb"	"./23.mnist����?��-������������.ipynb"
mv "./28.mnistêy?Yê?±e-LSTM.ipynb"	"./28.mnist����?��-LSTM.ipynb"
mv "./29.?£Dí±£′?.ipynb"	"./29.?�?���.ipynb"
mv "./29.?£Dí??è?.ipynb"	"./29.?������.ipynb"
mv "30-31í???ê?±e/30.????êμ??-?¨1··?àà_cnn.ipynb"	"30-31í???ê?±e/30.��???-è������_cnn.ipynb"
mv "30-31í???ê?±e/30.????êμ??-?¨1··?àà_fc.ipynb"	"30-31í???ê?±e/30.��???-è������_fc.ipynb"
mv "30-31í???ê?±e/31.????êμ??-?¨1··?àà?¤2a3ìDò.ipynb"	"30-31í???ê?±e/31.��???-è������?������.ipynb"
mv "./30-31í???ê?±e"	"./30-31?��?��"
mv "./3.tensorμ?ê?D?.ipynb"	"./3.tensor������.ipynb"
mv "./4.êy?Yéú3é.ipynb"	"./4.��������.ipynb"
mv "./5.?ù±?????2ù×÷1.ipynb"	"./5.������������1.ipynb"
mv "./6.?ù±?????2ù×÷2.ipynb"	"./6.������������2.ipynb"
mv "./7.êy?Yμ??÷òy.ipynb"	"./7.���?�����.ipynb"
mv "./8.×??ˉ?óμ?.ipynb"	"./8.�?�����.ipynb"
mv "./9.??D???1é.ipynb"	"./9.���??�.ipynb"
Ready! I converted 22 files in 0 seconds.

第二步,从gbk转换到utf8,执行:convmv -r -f gbk -t utf8 * --notest

$ convmv -r -f gbk -t utf8 * --notest
mv "./10.�����??�.ipynb"	"./10.非线性回归.ipynb"
mv "./13.mnist����?���򵥳���.ipynb"	"./13.mnist数据识别简单程序.ipynb"
mv "./15.mnist����?��-������.ipynb"	"./15.mnist数据识别-交叉熵.ipynb"
mv "./17.mnist����?��-����Dropout.ipynb"	"./17.mnist数据识别-不用Dropout.ipynb"
mv "./17.mnist����?��-Dropout.ipynb"	"./17.mnist数据识别-Dropout.ipynb"
mv "./17.mnist����?��-������.ipynb"	"./17.mnist数据识别-正则化.ipynb"
mv "./18.mnist����?��-Adam�?���.ipynb"	"./18.mnist数据识别-Adam优化器.ipynb"
mv "./23.mnist����?��-������������.ipynb"	"./23.mnist数据识别-卷积神经网络.ipynb"
mv "./28.mnist����?��-LSTM.ipynb"	"./28.mnist数据识别-LSTM.ipynb"
mv "./29.?������.ipynb"	"./29.模型载入.ipynb"
mv "./29.?�?���.ipynb"	"./29.模型保存.ipynb"
mv "30-31?��?��/30.��???-è������_cnn.ipynb"	"30-31?��?��/30.项目实战-猫狗分类_cnn.ipynb"
mv "30-31?��?��/30.��???-è������_fc.ipynb"	"30-31?��?��/30.项目实战-猫狗分类_fc.ipynb"
mv "30-31?��?��/31.��???-è������?������.ipynb"	"30-31?��?��/31.项目实战-猫狗分类预测程序.ipynb"
mv "./30-31?��?��"	"./30-31图像识别"
mv "./3.tensor������.ipynb"	"./3.tensor的属性.ipynb"
mv "./4.��������.ipynb"	"./4.数据生成.ipynb"
mv "./5.������������1.ipynb"	"./5.基本运算操作1.ipynb"
mv "./6.������������2.ipynb"	"./6.基本运算操作2.ipynb"
mv "./7.���?�����.ipynb"	"./7.数据的索引.ipynb"
mv "./8.�?�����.ipynb"	"./8.自动求导.ipynb"
mv "./9.���??�.ipynb"	"./9.线性回归.ipynb"
Ready! I converted 22 files in 0 seconds.

然后,看到国语汉字就舒服了。

  系统运维 最新文章
配置小型公司网络WLAN基本业务(AC通过三层
如何在交付运维过程中建立风险底线意识,提
快速传输大文件,怎么通过网络传大文件给对
从游戏服务端角度分析移动同步(状态同步)
MySQL使用MyCat实现分库分表
如何用DWDM射频光纤技术实现200公里外的站点
国内顺畅下载k8s.gcr.io的镜像
自动化测试appium
ctfshow ssrf
Linux操作系统学习之实用指令(Centos7/8均
上一篇文章      下一篇文章      查看所有文章
加:2021-11-12 19:59:45  更:2021-11-12 20:00:26 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年11日历 -2024/11/15 23:50:15-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码