当前位置: 首页 > article >正文

20250206在ubuntu20.04下使用unzip解压缩带中文名的文件

unzip -O GBK yourfile.zip
unzip -O CP936 xxx.zip
unar xxx.zip


20250206在ubuntu20.04下使用unzip解压缩带中文名的文件
2025/2/6 20:03


缘起:有些ZIP文件,里面有中文文件名。在WINDOWS系统中解压缩正常。
但是在Ubuntu20.04下可以解压缩,也不影响使用。但是就是文件名路乱码了。
一般认为是编码/字符集问题。

给RK3566刷机,想在Ubuntu20.04下刷机,需要需要工具:
Z:\Android13.0\RKTools\linux\Linux_Upgrade_Tool\upgrade_tool_v2.17_for_linux.zip


rootroot@rootroot-X99-Turbo:~$ 
rootroot@rootroot-X99-Turbo:~$ 
rootroot@rootroot-X99-Turbo:~$ 
rootroot@rootroot-X99-Turbo:~$ mkdir temp
rootroot@rootroot-X99-Turbo:~$ ll
rootroot@rootroot-X99-Turbo:~$ cd temp
rootroot@rootroot-X99-Turbo:~/temp$ ll
total 8
drwxrwxr-x  2 rootroot rootroot 4096 2月   6 21:13 ./
drwxr-xr-x 36 rootroot rootroot 4096 2月   6 21:13 ../
rootroot@rootroot-X99-Turbo:~/temp$ 
rootroot@rootroot-X99-Turbo:~/temp$ 
rootroot@rootroot-X99-Turbo:~/temp$ 
rootroot@rootroot-X99-Turbo:~/temp$ ll
total 1400
drwxrwxr-x  2 rootroot rootroot    4096 2月   6 21:13 ./
drwxr-xr-x 36 rootroot rootroot    4096 2月   6 21:13 ../
-rwx------  1 rootroot rootroot 1423018 12月 10 10:06 upgrade_tool_v2.17_for_linux.zip*
rootroot@rootroot-X99-Turbo:~/temp$ 
rootroot@rootroot-X99-Turbo:~/temp$ unzip upgrade_tool_v2.17_for_linux.zip 
Archive:  upgrade_tool_v2.17_for_linux.zip
   creating: upgrade_tool_v2.17_for_linux/
 extracting: upgrade_tool_v2.17_for_linux/config.ini  
  inflating: upgrade_tool_v2.17_for_linux/revision.txt  
  inflating: upgrade_tool_v2.17_for_linux/upgrade_tool  
  inflating: upgrade_tool_v2.17_for_linux/├№┴ю??┐к?в?д?????├?─??.pdf  
rootroot@rootroot-X99-Turbo:~/temp$ 

rootroot@rootroot-X99-Turbo:~/temp$ ll
total 1404
drwxrwxr-x  3 rootroot rootroot    4096 2月   6 21:13 ./
drwxr-xr-x 36 rootroot rootroot    4096 2月   6 21:13 ../
drwxrwxr-x  2 rootroot rootroot    4096 6月  13  2022 upgrade_tool_v2.17_for_linux/
-rwx------  1 rootroot rootroot 1423018 12月 10 10:06 upgrade_tool_v2.17_for_linux.zip*
rootroot@rootroot-X99-Turbo:~/temp$ 
rootroot@rootroot-X99-Turbo:~/temp$ mv upgrade_tool_v2.17_for_linux 1upgrade_tool_v2.17_for_linux
rootroot@rootroot-X99-Turbo:~/temp$ ll
total 1404
drwxrwxr-x  3 rootroot rootroot    4096 2月   6 21:13 ./
drwxr-xr-x 36 rootroot rootroot    4096 2月   6 21:13 ../
drwxrwxr-x  2 rootroot rootroot    4096 6月  13  2022 1upgrade_tool_v2.17_for_linux/
-rwx------  1 rootroot rootroot 1423018 12月 10 10:06 upgrade_tool_v2.17_for_linux.zip*
rootroot@rootroot-X99-Turbo:~/temp$ 
rootroot@rootroot-X99-Turbo:~/temp$ unzip -O GBK upgrade_tool_v2.17_for_linux.zip 
Archive:  upgrade_tool_v2.17_for_linux.zip
   creating: upgrade_tool_v2.17_for_linux/
 extracting: upgrade_tool_v2.17_for_linux/config.ini  
  inflating: upgrade_tool_v2.17_for_linux/revision.txt  
  inflating: upgrade_tool_v2.17_for_linux/upgrade_tool  
  inflating: upgrade_tool_v2.17_for_linux/命令行开发工具使用文档.pdf  
rootroot@rootroot-X99-Turbo:~/temp$ 

rootroot@rootroot-X99-Turbo:~/temp$ ll
total 1408
drwxrwxr-x  4 rootroot rootroot    4096 2月   6 21:14 ./
drwxr-xr-x 36 rootroot rootroot    4096 2月   6 21:13 ../
drwxrwxr-x  2 rootroot rootroot    4096 6月  13  2022 1upgrade_tool_v2.17_for_linux/
drwxrwxr-x  2 rootroot rootroot    4096 6月  13  2022 upgrade_tool_v2.17_for_linux/
-rwx------  1 rootroot rootroot 1423018 12月 10 10:06 upgrade_tool_v2.17_for_linux.zip*
rootroot@rootroot-X99-Turbo:~/temp$ 
rootroot@rootroot-X99-Turbo:~/temp$ 


百度:unzip 中文 乱码

https://cloud.tencent.com/developer/article/1948412
Linux下unzip解压中文乱码问题

yay -S unzip-iconv


https://blog.csdn.net/gd18602/article/details/140600223
unzip命令解压出现中文乱码

iconv -f UTF-8 -t GBK inputfile.txt -o outputfile.txt


http://www.kler.cn/a/535154.html

相关文章:

  • 【基于SprintBoot+Mybatis+Mysql】电脑商城项目之修改密码和个人资料
  • GitHub 使用教程:从入门到进阶
  • LabVIEW与PLC交互
  • 【玩转 Postman 接口测试与开发2_018】第14章:利用 Postman 初探 API 安全测试
  • React 第二十二节 useSyncExternalStore Hook 常见问题及用法详解
  • 零代码搭建个人博客—Zblog结合内网穿透发布公网
  • Golang的引用类型和指针
  • DeepSeek 多模态大模型Janus-Pro本地部署教程
  • 【教程】docker升级镜像
  • 《C#之集训1-20121019c#基础》
  • 【人工智能】使用deepseek初体验
  • 代码随想录算法训练营第四十四天-动态规划-子序列-392.判断子序列
  • OKHttp拦截器解析
  • OpenOffice实现word转pdf
  • 深度整理总结MySQL——行记录存储
  • tcpdump 的工作层次
  • 计算机网络笔记再战——理解几个经典的协议4
  • AI 编程工具—Cursor进阶使用 生成AI工作流
  • 售后板子HDMI无输出分析
  • 力扣.270. 最接近的二叉搜索树值(中序遍历思想)
  • 分析用户请求K8S里ingress-nginx提供的ingress流量路径
  • 服务器升级nginx版本
  • ImportError: cannot import name ‘Undefined‘ from ‘pydantic.fields‘
  • 使用 OpenGL ES 在 iOS 上渲染一个四边形:从基础到实现
  • DKG(Distributed Key Generation)协议
  • 设计模式六大原则和单例模式