26 lines
460 B
Markdown
26 lines
460 B
Markdown
|
---
|
||
|
tags: [linux]
|
||
|
title: Compression
|
||
|
created: '2021-11-06T22:08:33.761Z'
|
||
|
modified: '2021-12-31T10:35:51.469Z'
|
||
|
---
|
||
|
|
||
|
# Compression
|
||
|
### Tar archives
|
||
|
|
||
|
- `tar -cf file.tar dir/` -archive using tar, extract `tar -xvf file.tar`
|
||
|
- `sudo tar -czf file.tar.gz dir/` gzip dir
|
||
|
|
||
|
### Gzip
|
||
|
- `gunzip archive.gz`
|
||
|
|
||
|
### Zip archives
|
||
|
|
||
|
- `unzip -x <file.zip> -d <destination_dir>` - unzip
|
||
|
-`zip -r {filename.zip} {foldername}` -zip
|
||
|
|
||
|
|
||
|
### 7zip archives
|
||
|
- `7z x <file.7z>` - unzip
|
||
|
|