7Zip: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| Line 6: | Line 6: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
cd /etc/nginx | cd /etc/nginx | ||
7z a chorke- | 7z a chorke-nginx-academia.prod.2024-06-28T2023.7z sites-enabled | ||
7z a chorke- | 7z a chorke-nginx-academia.prod.2024-06-28T2023.7z sites-enabled -psadaqah! | ||
7z a chorke- | 7z a chorke-nginx-academia.prod.2024-06-28T2023.7z sites-enabled '-psadaqah!' | ||
7z a chorke- | 7z a chorke-nginx-academia.prod.2024-06-28T2023.7z sites-enabled '-x!default' | ||
7z a chorke- | 7z a chorke-nginx-academia.prod.2024-06-28T2023.7z sites-enabled '-xr!default' | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==Decompress== | ==Decompress== | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
7z l chorke- | 7z l chorke-nginx-academia.prod.2024-06-28T2023.7z | ||
7z e chorke- | 7z e chorke-nginx-academia.prod.2024-06-28T2023.7z | ||
7z x chorke- | 7z x chorke-nginx-academia.prod.2024-06-28T2023.7z | ||
7z x chorke- | 7z x chorke-nginx-academia.prod.2024-06-28T2023.7z -psadaqah! | ||
7z x chorke- | 7z x chorke-nginx-academia.prod.2024-06-28T2023.7z '-psadaqah!' | ||
7z x chorke- | 7z x chorke-nginx-academia.prod.2024-06-28T2023.7z -o./chorke-nginx-academia-production/ | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 39: | Line 39: | ||
{|class="wikitable" | {|class="wikitable" | ||
|- | |- | ||
!scope="col"| Type !!scope="col"| | !scope="col"| Type !!scope="col"| Compress !!scope="col"| Decompress !!scope="col"| Algorithm !!scope="col"| ⚪ | ||
|- | |- | ||
| '''7z''' | | '''7z''' || <code>time 7z a nginx.2024-06-30T1519.7z nginx</code> || <code>time 7z x nginx.2024-06-30T1519.7z</code> || LZMA, LZMA2, PPMd, BZIP2, DEFLATE, Store || 🟠 | ||
|- | |- | ||
| '''zip''' | | '''zip''' || <code>time 7z a nginx.2024-06-30T1519.zip nginx</code> || <code>time 7z x nginx.2024-06-30T1519.zip</code> || DEFLATE, BZIP2, LZMA, Store || 🟢 | ||
|- | |- | ||
| '''tar.gz''' | | '''tar.gz''' || <code>time tar cf - nginx|7z a -si nginx.2024-06-30T1519.tar.gz</code> || <code>time 7z x nginx.2024-06-30T1519.tar.gz -so|7z x -si -ttar -onginx</code> || DEFLATE=LZ77+Huffman || 🟢 | ||
|- | |- | ||
| '''tar.xz''' | | '''tar.xz''' || <code>time tar cf - nginx|7z a -si nginx.2024-06-30T1519.tar.xz -txz</code> || <code>time 7z x nginx.2024-06-30T1519.tar.xz -so|7z x -si -ttar -onginx</code> || LZMA2 || 🟠 | ||
|- | |- | ||
| '''tar.bz2''' || <code>time tar cf - nginx|7z a -si | | '''tar.bz2''' || <code>time tar cf - nginx|7z a -si nginx.2024-06-30T1519.tar.bz2 -tbzip2</code> || <code>time 7z x nginx.2024-06-30T1519.tar.bz2 -so|7z x -si -ttar -onginx</code> || BZIP2 || 🟡 | ||
|} | |} | ||
Revision as of 13:46, 21 October 2025
sudo apt -qq update sudo apt install -y p7zip-full 7z
Compress
cd /etc/nginx
7z a chorke-nginx-academia.prod.2024-06-28T2023.7z sites-enabled
7z a chorke-nginx-academia.prod.2024-06-28T2023.7z sites-enabled -psadaqah!
7z a chorke-nginx-academia.prod.2024-06-28T2023.7z sites-enabled '-psadaqah!'
7z a chorke-nginx-academia.prod.2024-06-28T2023.7z sites-enabled '-x!default'
7z a chorke-nginx-academia.prod.2024-06-28T2023.7z sites-enabled '-xr!default'
Decompress
7z l chorke-nginx-academia.prod.2024-06-28T2023.7z
7z e chorke-nginx-academia.prod.2024-06-28T2023.7z
7z x chorke-nginx-academia.prod.2024-06-28T2023.7z
7z x chorke-nginx-academia.prod.2024-06-28T2023.7z -psadaqah!
7z x chorke-nginx-academia.prod.2024-06-28T2023.7z '-psadaqah!'
7z x chorke-nginx-academia.prod.2024-06-28T2023.7z -o./chorke-nginx-academia-production/
Commands
a : Add files to archive b : Benchmark d : Delete files from archive e : Extract files from archive (without using directory names) h : Calculate hash values for files i : Show information about supported formats l : List contents of archive rn : Rename files in archive t : Test integrity of archive u : Update files to archive x : eXtract files with full paths
Cheatsheet
| Type | Compress | Decompress | Algorithm | ⚪ |
|---|---|---|---|---|
| 7z | time 7z a nginx.2024-06-30T1519.7z nginx |
time 7z x nginx.2024-06-30T1519.7z |
LZMA, LZMA2, PPMd, BZIP2, DEFLATE, Store | 🟠 |
| zip | time 7z a nginx.2024-06-30T1519.zip nginx |
time 7z x nginx.2024-06-30T1519.zip |
DEFLATE, BZIP2, LZMA, Store | 🟢 |
| tar.gz | time tar cf - nginx|7z a -si nginx.2024-06-30T1519.tar.gz |
time 7z x nginx.2024-06-30T1519.tar.gz -so|7z x -si -ttar -onginx |
DEFLATE=LZ77+Huffman | 🟢 |
| tar.xz | time tar cf - nginx|7z a -si nginx.2024-06-30T1519.tar.xz -txz |
time 7z x nginx.2024-06-30T1519.tar.xz -so|7z x -si -ttar -onginx |
LZMA2 | 🟠 |
| tar.bz2 | time tar cf - nginx|7z a -si nginx.2024-06-30T1519.tar.bz2 -tbzip2 |
time 7z x nginx.2024-06-30T1519.tar.bz2 -so|7z x -si -ttar -onginx |
BZIP2 | 🟡 |
DateTime Format
echo "$(TZ=UTC-8 date +'%Y-%m-%dT%H%M')"
echo "$(TZ=UTC-8 date +'%FT%H%M')"
BKP_DATE_N_TIME="$(TZ=UTC-8 date +'%FT%H%M')"
:'
2025-10-10T1010
├─ 2025-10-21
│ ├─ 2025 « %Y
│ ├─ 10 « %m
│ └─ 10 « %d
└─ T1010
├─ T « Time
├─ 10 « %H
└─ 10 « %M
'
References
|
| ||