>>> how to unpack .7z ?
## Unpacking a `.7z` file
(works on macOS, Linux, and Windows – just pick the section that matches your system)
---
### 1. macOS
#### a. Using the Terminal (recommended)
| Step | Command | What it does |
|------|---------|--------------|
| 1. Install p7zip | `brew install p7zip` | Installs the 7‑Zip command‑line tools (`7z`) |
| 2. Unpack | `7z x /path/to/archive.7z -o/desired/destination/` | `x` = “extract all”, `-o` = destination
folder |
**Example**
```bash
brew install p7zip # one‑time install
7z x ~/Downloads/mysite.7z -o~/Sites # extracts into ~/Sites
```
- **`-o`** is optional – if you omit it the files go into the current directory.
- If the archive is password‑protected you’ll be prompted for the password automatically.
#### b. Using a GUI app
| App | How to use |
|-----|------------|
| **Keka** | Drag the `.7z` file onto the Keka icon, or use the “Open File” dialog. |
| **The Unarchiver** | Same as above – macOS ships the “Unarchive” context menu after installing. |
| **7‑Zip** (third‑party) | Open the file with the app, then choose “Extract”. |
All three will create a folder with the archive’s contents.
---
### 2. Linux
```bash
sudo apt-get install p7zip-full # Debian/Ubuntu
sudo yum install p7zip # RHEL/CentOS
sudo dnf install p7zip # Fedora
```
Then:
```bash
7z x file.7z
```
Same options (`-o`, `-p`, etc.) apply.
---
### 3. Windows
1. **Download 7‑Zip**: https://www.7-zip.org/
2. Install it.
3. **Right‑click** the `.7z` file → **7‑Zip** → **Extract Here** (or **Extract to “folder\”**).
If you prefer PowerShell:
```powershell
# Assuming 7z.exe is in your PATH
7z x .\file.7z -oC:\dest\
```
---
### Quick Reference: Common `7z` Options
| Option | Meaning | Example |
|--------|---------|---------|
| `x` | Extract all files (preserves paths) | `7z x archive.7z` |
| `e` | Extract without paths | `7z e archive.7z` |
| `-o<folder>` | Destination folder | `-oC:\tmp\` |
| `-p<password>` | Use password | `-p1234` |
| `-i!<pattern>` | Include only files matching pattern | `-i!*.txt` |
| `-i-!<pattern>` | Exclude files matching pattern | `-i-!*.jpg` |
---
## Troubleshooting
| Symptom | Fix |
|---------|-----|
| “File not found” or “7z: command not found” | Make sure `p7zip` (macOS) / `7zip` (Linux) is installed and
in your `PATH`. |
| “Password incorrect” | Verify the password, or try removing `-p` to be prompted interactively. |
| “Archive is corrupted” | The file may be partially downloaded. Re‑download it. |
| “Unsupported compression method” | Some very old or proprietary `.7z` files might use an unsupported
algorithm. Try a newer 7‑Zip version or use the GUI app that can auto‑detect the method. |
---
### TL;DR
```bash
# macOS (Terminal)
brew install p7zip
7z x file.7z -o~/Destination/
```
or drag it into Keka/The Unarchiver for a one‑click GUI experience.