2018-11-13 08:54:50 +00:00
---
layout: page
category-title: Intermediate commands
category-page: intermediate
tags:
author: Andrea Brites Marto
title: 7z
---
< p >
2018-11-15 08:05:41 +00:00
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 >
2018-11-13 08:54:50 +00:00
< / p >