9f0175139d
git-svn-id: svn+ssh://atelier.inf.usi.ch/home/bevilj/group-1@192 a672b425-5310-4d7a-af5c-997e18724b81
65 lines
No EOL
1.4 KiB
HTML
65 lines
No EOL
1.4 KiB
HTML
---
|
|
layout: page
|
|
category-title: Intermediate commands
|
|
category-page: intermediate
|
|
tags:
|
|
author: Andrea Brites Marto
|
|
title: 7z
|
|
---
|
|
|
|
<p>
|
|
A .7z. file is an archive format that stands for 7-zip. By default, Mac OS X does not know how to handle these files, but that is not a big deal because you can download for free in App Store. The program supports 7z, ZIP, CAB, ARJ, BZIP2, TAR, CPIO, RPM and DEB.<br>
|
|
|
|
So, first of all, you need to download Unarchiver in order to use this command.<br>
|
|
|
|
The basic syntax is:
|
|
|
|
<pre>
|
|
7z [adeltux] [-] [SWITCH] <code><ARCHIVE_NAME> <ARGUMENTS></code>
|
|
</pre>
|
|
|
|
Here some useful options that we will use to explain some examples:
|
|
|
|
<ul>
|
|
<li><code>a</code> Add</li>
|
|
<li><code>d</code> Delete</li>
|
|
<li><code>e</code> Extract</li>
|
|
<li><code>l</code> List</li>
|
|
<li><code>t</code> Test</li>
|
|
<li><code>u</code> Update</li>
|
|
<li><code>x</code> Extract with full paths</li>
|
|
</ul>
|
|
|
|
The simplest way to use <code>7z</code> if we want to extracts all files from archive archive.zip to the current directory.
|
|
|
|
<pre>
|
|
7z e archive.zip
|
|
</pre>
|
|
|
|
Well, now we talk about the switches.
|
|
There are many type of switches, we will see the most common ones.<br>
|
|
|
|
-m (Set compression Method)
|
|
|
|
<pre>
|
|
-m<method_parameters>
|
|
</pre>
|
|
|
|
The format for this switch depends on the archive type which are:
|
|
<ul>
|
|
<li>Zip</li>
|
|
<li>GZip</li>
|
|
<li>BZip2</li>
|
|
<li>7z</li>
|
|
<li>XZ</li>
|
|
<li>WIM</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</p> |