转:http://www.thegeekstuff.com/2010/04/7z-7zip-7za-file-compression/

Question: How do I uncompress a *.7z file ( 7zip file ) in UNIX / Linux ? Can you explain with a simple example?

Answer: Use 7za command to unzip a 7z file ( 7zip file ) on Unix platform as shown below.

Verify whether you have 7za command on your system.

# whereis 7za
7za: /usr/bin/7za /usr/share/man/man1/7za.1.gz

If you don’t have 7za command, install p7zip package as shown below.

Install p7zip to unzip *.7z files on Fedora

# yum install p7zip

Install p7zip to unzip *.7z files on Debian and Ubuntu

$ sudo apt-get install p7zip

Uncompressing a *.7z 7zip files in Linux using 7za

$ 7za e myfiles.7z 

7-Zip (A) 9.04 beta  Copyright (c) 1999-2009 Igor Pavlov  2009-05-30
p7zip Version 9.04 (locale=C,Utf16=off,HugeFiles=on,1 CPU) Processing archive: ../../myfiles.7z Extracting myfiles/test1
Extracting myfiles/test2
Extracting myfiles/test
Extracting myfiles Everything is Ok Folders: 1
Files: 3
Size: 7880
Compressed: 404
  • 7za – command name
  • e – specifies the 7z to be extracted
  • myfiles.7z – is the file that is to be extracted

Creating a 7zip compression file in Linux

$ 7za a myfiles.7z myfiles/

7-Zip (A) 9.04 beta  Copyright (c) 1999-2009 Igor Pavlov  2009-05-30
p7zip Version 9.04 (locale=C,Utf16=off,HugeFiles=on,1 CPU)
Scanning Creating archive myfiles.7z Compressing myfiles/test1
Compressing myfiles/test2 Everything is Ok

Files and sub directories of myfiles/ will be added to the myfiles.7z.

  • a – add to archive
  • file.7z – archive file to which these files and dir from dir1 will be added to.

7zip File: How to Uncompress 7z files on Ubuntu, Debian, Fedora的更多相关文章

  1. 如何用7-zip创建自解压文件,7Z软件如何使用

    1 要创建自解压文件,一般都是双击直接解压到C盘的Program Files文件夹里面,或许还需要在桌面创建一个快捷方式之类的.但是一般的绿色软件除了复制到Program Files还需要运行一下绿化 ...

  2. LINUX软件./configure 配置出现:configure: error: newly created file is older than distributed files!

    当在安装tar源码包的时候出现以下报错如何解决? [root@jieniruyan gst-fluendo-mp3-]# ./configurechecking for a BSD-compatibl ...

  3. configure: error: newly created file is older than distributed files!

    在linux下安装软件包的时候,有时候提示 configure: error: newly created file is older than distributed files!Check you ...

  4. input file 获取不到Request.Files 解决办法

    <input type="file" name="xxxxxxx"/>必须有“name”属性,否则在后台代码中用Request.Files是取不到值 ...

  5. Database 'xxx' cannot be upgraded because it is read-only or has read-only file Make the database or files writeable, and rerun recovery.

      在分离数据库DatabaseName(暂且用DatabaseName代替该数据库名)后,我将其数据文件以及日志文件移动到新增的磁盘上.然后附加该数据库,结果报如下错误: Database 'Dat ...

  6. Linux--Introduction and Basic commands(Part one)

    Welcome to Linux world! Introduction and Basic commands--Part one J.C 2018.3.11 Chapter 1 What Is Li ...

  7. Linux 网络流量查看 Linux ip traffic monitor

    Network monitoring on Linux This post mentions some linux command line tools that can be used to mon ...

  8. 国产中标麒麟Linux部署dotnet core 环境并运行项目 (一) 安装dotnet core

    背景 根据我之前写的文章 将 Net 项目升级 Core项目经验:(一)迁移Net项目为Net Core\Standard项目,我们将公司内部最核心的ORM框架迁移到net core 上面,并在win ...

  9. tar、7z(7zip)压缩/解压缩指令的使用

    本文介绍tar.7z指令的使用方法 tar指令 在Linux中,使用的最多的压缩/解压缩指令就是tar指令了. tar指令用来将多个文件/目录结构打包.在实际使用中,往往使用tar对压缩的支持,即同时 ...

随机推荐

  1. vivo面试经验4(linux基本操作,最基本,必须得会!!)

    操作linux通过xshell进行连接: 基本操作介绍 1.shutdown -h 关机 shutdown -r 重启 2.mkdir aaa 新建目录aaa rmdir aaa 删除目录aaa 3. ...

  2. php中的split函数

    字符串分割函数:split函数 <?php $email='microsoft@exam!ple.com'; $domain = split('\.|@|!',$email);//split分割 ...

  3. bzoj4430 [Nwerc2015]Guessing Camels赌骆驼

    传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=4430 [题解] 把每只骆驼在第一个人.第二个人.第三个人的位置找出来,然后做三维偏序即可. ...

  4. 【洛谷 SP283】NAPTIME - Naptime(DP)

    题目链接 先考虑如果只有一天,那么该怎么做. 设\(f[i][j][1]\)表示前\(i\)个小时睡了\(j\)个小时并且第\(j\)个小时正在睡觉时的最大体力,\(f[i][j][1]\)表示前\( ...

  5. poj 2312 Battle City(优先队列+bfs)

    题目链接:http://poj.org/problem?id=2312 题目大意:给出一个n*m的矩阵,其中Y是起点,T是终点,B和E可以走,S和R不可以走,要注意的是走B需要2分钟,走E需要一分钟. ...

  6. 安装l Xposed Framework

    How to install Xposed Framework on Android 4.x.x :   1. For Android 4.0.3 through 4.4.4 Visit this X ...

  7. 无线路由器中WMM/Short GI/AP隔离各是什么功能, 开启时PC无法ping通手机.

      无线路由器的WMM功能和开启ap隔离,以及开启ShortGI有什么用 无线路由器中有开启WMM.开启Short GI和开启AP隔离分别代表什么呢?这是我在我的TP-LINK无线路由器TL-WR84 ...

  8. C语言ASM汇编内嵌语法

    转载:http://www.cnblogs.com/latifrons/archive/2009/09/17/1568198.html C语言ASM汇编内嵌语法 .3 GCC Inline ASM G ...

  9. 【转】java中的集合和数组

    转载自:http://www.cnblogs.com/summers/p/4094260.html 数组Array和集合的区别: (1)数组是大小固定的,并且同一个数组只能存放类型一样的数据(基本类型 ...

  10. P1709 [USACO5.5]隐藏口令Hidden Password

    P1709 [USACO5.5]隐藏口令Hidden Password 题目描述 有时候程序员有很奇怪的方法来隐藏他们的口令.Binny会选择一个字符串S(由N个小写字母组成,5<=N<= ...