zoukankan      html  css  js  c++  java
  • 在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 ~]#
  • 相关阅读:
    cocos2d-x3.x Vector
    CC_CALLBACK之间的区别
    android平台菜单返回键监听
    更方便的函数回调——Lambda
    MySQL 多实例启动和关闭脚本
    ERROR 23 (HY000) at line 29963: Out of resources when opening file
    [ERROR] Failed to open log
    ERROR 1005 (HY000): Can't create table'matrix.system_log' (errno: 150)
    show engine innodb statusG
    【转载】mysql 四种隔离级别分析
  • 原文地址:https://www.cnblogs.com/ayanmw/p/3255906.html
Copyright © 2011-2022 走看看