在linux下 用p7zip 命令行下 解压 iso文件

todo tomorrorw!

在linux下可以通过

mount IOSFILE.iso /media/myiso/ -o loop

这种方式挂载,然后直接从 目录中拷贝 iso的内容出来就可以。

但是总是不爽啊,在windows下,如果我需要,我可以直接解压的,winrar,7zip,uiso,等等都可以做到。但是在linux难道就没有工具可以直接解压缩iso的吗?

好吧,p7zip是7-zip的linux版本,地址:http://sourceforge.net/projects/p7zip

 

下载p7zip_9.20.1_src_all.tar.bz2后

解压 

tar xvf p7zip_9.20.1_src_all.tar.bz2

cd p7zip_9.20.1_src_all

make all3 && make install

就可以了,具体可以查看makefile 里面生成的文件不尽相同。

 

然后 可以用 p7zip来解压iso了。 

安装好的p7z在系统中的名字有:
[root@src-server ~]# 7z
7z 7za 7zFM 7zG 7zr
[root@src-server ~]# 7z

 

 解压iso文件的命令是:

7z x Windows.iso

查看压缩文件的内容是:

7z l Windows.iso

查看7z的帮助信息:
7z
7z --help

[root@src-server ~]# 7z --help

7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)

Usage: 7z <command> [<switches>...] <archive_name> [<file_names>...]
 [<@listfiles...>]

<Commands>
 a: Add files to archive
 b: Benchmark
 d: Delete files from archive
 e: Extract files from archive (without using directory names)
 l: List contents of archive
 t: Test integrity of archive
 u: Update files to archive
 x: eXtract files with full paths
<Switches>
 -ai[r[-|0]]{@listfile|!wildcard}: Include archives
 -ax[r[-|0]]{@listfile|!wildcard}: eXclude archives
 -bd: Disable percentage indicator
 -i[r[-|0]]{@listfile|!wildcard}: Include filenames
 -m{Parameters}: set compression Method
 -o{Directory}: set Output directory
 -p{Password}: set Password
 -r[-|0]: Recurse subdirectories
 -scs{UTF-8 | WIN | DOS}: set charset for list files
 -sfx[{name}]: Create SFX archive
 -si[{name}]: read data from stdin
 -slt: show technical information for } /*wind -so: write data to stdout
 -ssc[-]: set sensitive case mode
 -t{Type}: Set type of archive
 -u[-][p#][q#][r#][x#][y#][z#][!newArchiveName]: Update options
 -v{Size}[b|k|m|g]: Create volumes
 -w[{path}]: assign Work directory. Empty path means a temporary directory
 -x[r[-|0]]]{@listfile|!wildcard}: eXclude filenames
 -y: assume Yes on all queries

当然这个7z是通吃的,可以解压所有支持的文件类型,zip rar cab wim ntfs 等等
7z x arcgis10server_win.zip

 

好了问题解决。用7z 非root用户可以轻松解压iso文件。

 

貌似有libcdio 的库 好像也可以。

[root@xen1 ~]# iso【Tab查看】
isodebug   isohybrid  iso-info   isosize
isodump    isoinfo    iso-read   isovfy

[root@xen1 ~]# iso-read
iso-read: you need to specify an ISO-9660 image name.
iso-read: Use option --image or try --help.
[root@xen1 ~]# rpm -qf `which iso-read`
libcdio-0.81-3.1.el6.x86_64
[root@xen1 ~]# iso-read --help
Usage: iso-read [OPTION...]
  -d, --debug=INT            Set debugging to LEVEL.
  -i, --image=FILE           Read from ISO-9660 image. This option is mandatory
  -e, --extract=FILE         Extract FILE from ISO-9660 image. This option is
                             mandatory.
  -k, --ignore               Ignore read error(s), i.e. keep going
  --no-header                Don't display header and copyright (for
                             regression testing)
  -o, --output-file=FILE     Output file. This option is mandatory.
  -V, --version              display version and copyright information and exit

Help options:
  -?, --help                 Show this help message
  --usage                    Display brief usage message
[root@xen1 ~]#

 

转载于:https://www.cnblogs.com/ayanmw/p/3255906.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值