鱼C论坛

 找回密码
 立即注册
查看: 333|回复: 8

Linux文件转化

[复制链接]
发表于 2023-10-27 21:12:27 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
各位鱼油,请问Linux怎么把zip格式文件解压?谢谢
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2023-10-27 21:12:47 | 显示全部楼层
在Linux中,你可以使用命令行工具unzip来解压zip格式的文件。请按照以下步骤操作:

1. 打开终端。
2. 使用cd命令切换到包含zip文件的目录,或者指定zip文件的完整路径。
3. 运行以下命令来解压zip文件:
  
  1.    unzip filename.zip
  2.    
复制代码

   其中, filename.zip 是你要解压的zip文件的名称。

解压完成后,文件将被解压到当前目录下。如果你想要将文件解压到指定的目录,可以使用 -d 选项,例如:
  1. unzip filename.zip -d /path/to/destination
复制代码

其中, /path/to/destination 是你想要解压到的目标目录的路径。

希望这个解答能够帮到你!如果有任何问题,请随时提问。
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2023-10-27 21:12:59 | 显示全部楼层
在Linux中,你可以使用以下命令解压zip格式的文件:

命令: unzip *filename.zip*

示例: 如果要解压名为archive.zip的文件,可以运行以下命令:
[/code]
unzip archive.zip
[/code]

这将会将zip文件中的内容解压到当前目录下。如果你想解压到指定的目录,可以使用-d选项,并指定目标路径。

命令: unzip *filename.zip* -d *destination_directory*

示例: 如果要将zip文件中的内容解压到名为target_directory的目录下,可以运行以下命令:
[/code]
unzip archive.zip -d target_directory
[/code]

记得替换命令中的filename.zip为你要解压的zip文件的实际名称,以及destination_directory为你想要解压到的目标目录的实际路径。

球一个最佳答案谢谢啦!这对我非常重要!
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2023-10-27 21:15:15 | 显示全部楼层
在Linux下解压zip格式的文件,你可以使用unzip命令。以下是具体步骤:

1. 打开终端(Terminal)。

2. 切换到包含zip文件的目录。例如,如果zip文件在你的主目录下,你可以使用 cd ~ 命令切换到主目录。

3. 使用unzip命令解压文件。例如,如果你的文件名为 file.zip,你可以使用以下命令解压它:

  1. unzip file.zip
复制代码


unzip命令会将文件解压到当前目录下。如果你想将解压缩的文件放入特定目录,你可以使用 -d 参数指定目录。例如,如果你想解压到 ~/myfolder 目录下,你可以使用以下命令:

  1. unzip file.zip -d ~/myfolder
复制代码


注意:如果你的Linux系统中没有预装unzip命令,你可能需要先安装它。在基于Debian的系统(如Ubuntu)上,你可以使用以下命令安装:

  1. sudo apt-get install unzip
复制代码


在基于RHEL的系统(如CentOS)上,你可以使用以下命令安装:

  1. sudo yum install unzip
复制代码


希望这些信息对你有所帮助!
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2023-10-27 21:18:35 | 显示全部楼层
liuhongrun2022 发表于 2023-10-27 21:15
在Linux下解压zip格式的文件,你可以使用unzip命令。以下是具体步骤:

1. 打开终端(Terminal)。

但为什么bash提示:
  1. bash: unzip:未找到命令
复制代码
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2023-10-27 21:19:09 | 显示全部楼层
风眠 发表于 2023-10-27 21:18
但为什么bash提示:

sudo apt-get install unzip
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2023-10-27 21:21:55 | 显示全部楼层

哦,可我有unzip啊?
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2023-10-27 21:23:41 | 显示全部楼层
风眠 发表于 2023-10-27 21:21
哦,可我有unzip啊?

你安装一下试试
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2023-10-27 21:26:21 | 显示全部楼层
  1. $ yay -s unzip
  2. 21 aur/mingw-w64-minizip 1.2.13-1 (+1 0.00) (过时的: 2023-10-27)
  3.     Mini zip and unzip based on zlib (mingw-w64)
  4. 20 aur/gbkunzip 0.2-7 (+2 0.00)
  5.     Extract zip files with encoding GBK instead of UTF-8
  6. 19 aur/quazip-legacy 0.9.1-1 (+2 0.00) (孤儿包)
  7.     C++ wrapper for the Gilles Vollant's ZIP/UNZIP C package (Legacy version)
  8. 18 aur/runzip 1.4-1 (+3 0.00)
  9.     Convert filenames inside ZIP archives from autodetected older Russian encodings (koi8-r, koi8-u, cp866, windows-1251) to UTF-8
  10. 17 aur/perl-perlio-gzip 0.20-1 (+4 0.00)
  11.     Perl extension to provide a PerlIO layer to gzip/gunzip
  12. 16 aur/minizip2-2.3.3 2.3.3-6 (+0 0.00)
  13.     Mini zip and unzip based on libbsd and zlib. Version 2.3.3 (specific version).
  14. 15 aur/lunzip 1.13-3 (+5 0.00) (孤儿包)
  15.     Lunzip is a decompressor for the lzip format written in C.
  16. 14 aur/quazip-qt4 0.7.2-1 (+12 0.00) (孤儿包)
  17.     C++ wrapper for the Gilles Vollant's ZIP/UNZIP C package, qt4 version
  18. 13 aur/arc 5.21q-1 (+18 0.05)
  19.     Arc file archiver and compressor. Long since superceeded by zip/unzip but useful if have old .arc files need to unpack.
  20. 12 aur/unzrip-git 0.1.0.27.g1a4f74d-2 (+1 0.01)
  21.     Rust unzip, support for parallel decompression, automatic detection encoding
  22. 11 aur/unadf 1.0-5 (+5 0.00)
  23.     unzip like tool for Commodore Amiga filesystem ADF images
  24. 10 aur/unzip_all 1-1 (+0 0.00)
  25.     A tool to unzip all the .zip files in the current working directory.
  26. 9 aur/unzip-zstd 6.0-1 (+0 0.00)
  27.     For extracting and viewing files in .zip archives (with Zstandard support)
  28. 8 aur/unzip-natspec 6.0-7 (+36 0.49)
  29.     Unpacks .zip archives with non-latin filenames, using libnatspec patch from AltLinux.
  30. 7 archlinuxcn/julia-git-unzip 20231019.061215-1 (64.0 KiB 321.2 KiB)
  31.     Precompiled packages for julia-git
  32. 6 archlinuxcn/julia-git-unzip-src 0.2.0-2 (8.3 KiB 17.6 KiB)
  33.     Unzip.jl
  34. 5 archlinuxcn/unzip-natspec 6.0-7 (135.2 KiB 307.6 KiB)
  35.     Unpacks .zip archives with non-latin filenames, using libnatspec patch from AltLinux.
  36. 4 extra/quazip-qt6 1.4-1 (123.7 KiB 397.5 KiB)
  37.     C++ wrapper for the ZIP/UNZIP C package
  38. 3 extra/quazip-qt5 1.4-1 (111.0 KiB 365.1 KiB)
  39.     C++ wrapper for the ZIP/UNZIP C package
  40. 2 core/minizip 1:1.3-1 (27.5 KiB 85.9 KiB) (已安装)
  41.     Mini zip and unzip based on zlib
  42. 1 extra/unzip 6.0-20 (142.3 KiB 303.8 KiB)
  43.     For extracting and viewing files in .zip archives
  44. ==> 要安装的包 (示例: 1 2 3, 1-3 或 ^4)
  45. ==> 1
  46. Sync Explicit (1): unzip-6.0-20
  47. -> error installing repo packages
复制代码
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-5-1 10:39

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表