spanskiblog/content/posts/Compression.md

31 lines
715 B
Markdown
Raw Normal View History

2022-12-24 17:42:40 +01:00
2022-12-24 17:09:22 +01:00
+++
2022-12-24 22:54:34 +01:00
date="2022-12-24"
2022-12-24 17:09:22 +01:00
author="spanskiduh"
title="Compression"
2022-12-24 17:42:40 +01:00
description="click to read about Compression"
2022-12-24 17:09:22 +01:00
+++
# Compression
2022-12-24 22:54:34 +01:00
2022-12-24 17:09:22 +01:00
### 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
- ` zip -r assignment3 assignment3 -x assignment3/images/** -x assignment3/instructions.pdf` - exclude
- ` unzip -l assignment3.zip` - list
### 7zip archives
- `7z x <file.7z>` - unzip
2022-12-24 22:54:34 +01:00
## If you are super lazy
- `binwalk -e -M <file.zip>` - tries different extraction methods and recursively uznips