Zip: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{|class='wikitable' style='width:100%;margin:-11px 0 6px 0' | |||
|valign='top' style='width:50%'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
sudo apt -qq update | |||
sudo apt install -y zip unzip | |||
unzip -V | |||
zip -V | |||
</syntaxhighlight> | |||
|valign='top' style='width:50%'| | |||
|} | |||
==Compress== | ==Compress== | ||
<syntaxhighlight lang= | {|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | ||
!scope='col' style='text-align:left'| | |||
Compress | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
cd /etc/nginx | cd /etc/nginx | ||
zip -r chorke- | zip -r chorke-nginx-academia.prod.2024-06-28T2023.zip sites-enabled | ||
zip -r chorke- | zip -r chorke-nginx-academia.prod.2024-06-28T2023.zip sites-enabled -x default | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |||
==Decompress== | ==Decompress== | ||
<syntaxhighlight lang= | {|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | ||
unzip -l chorke- | !scope='col' style='text-align:left'| | ||
unzip chorke- | Decompress | ||
unzip chorke- | |- | ||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
unzip -l chorke-nginx-academia.prod.2024-06-28T2023.zip | |||
unzip chorke-nginx-academia.prod.2024-06-28T2023.zip | |||
unzip chorke-nginx-academia.prod.2024-06-28T2023.zip -d chorke-nginx-academia-production | |||
</syntaxhighlight> | |||
|} | |||
==Commands== | |||
{|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | |||
!scope='col' style='text-align:left' colspan='2'| | |||
Commands | |||
|- | |||
|valign='top' style='width:50%'| | |||
<syntaxhighlight style='margin:3px 0' lang='text'> | |||
-r: Recursive child folder | |||
-x: Exclude file from the archive | |||
-l: List the contents of the archive | |||
-f: Specifies the name of the archive | |||
</syntaxhighlight> | </syntaxhighlight> | ||
== | |valign='top' style='width:50%'| | ||
|} | |||
==DateTime Format== | ==DateTime Format== | ||
<syntaxhighlight lang= | {|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | ||
echo "$(date +' | !scope='col' style='text-align:left' colspan='2'| | ||
DateTime Format | |||
|- | |||
|valign='top' style='width:50%'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
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 | |||
' | ' | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|valign='top' style='width:50%'| | |||
|} | |||
==References== | ==References== | ||
{| | {|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' | ||
| valign= | !scope='col' style='text-align:left' colspan='3'| | ||
References | |||
|- | |||
|valign='top' style='width:33%'| | |||
* [[7Zip]] | * [[7Zip]] | ||
* [https://en.wikipedia.org/wiki/ZIP_(file_format) ZIP] | * [https://en.wikipedia.org/wiki/ZIP_(file_format) ZIP] | ||
| Line 55: | Line 89: | ||
* [[Jar]] | * [[Jar]] | ||
| valign= | |valign='top' style='width:34%'| | ||
|valign='top' style='width:33%'| | |||
|- | |- | ||
|valign='top'| | |||
| valign= | |||
* [[Minikube Systemd]] | * [[Minikube Systemd]] | ||
* [[Alpine/Morefine]] | * [[Alpine/Morefine]] | ||
| Line 75: | Line 105: | ||
* [[TMux]] | * [[TMux]] | ||
| valign= | |valign='top'| | ||
* [[Chorke Academia Backup]] | * [[Chorke Academia Backup]] | ||
* [[Google Cloud CLI]] | * [[Google Cloud CLI]] | ||
* [[AWS CLI]] | * [[AWS CLI]] | ||
| valign= | |valign='top'| | ||
|} | |} | ||
Latest revision as of 01:58, 16 January 2026
sudo apt -qq update
sudo apt install -y zip unzip
unzip -V
zip -V
|
Compress
|
Compress |
|---|
cd /etc/nginx
zip -r chorke-nginx-academia.prod.2024-06-28T2023.zip sites-enabled
zip -r chorke-nginx-academia.prod.2024-06-28T2023.zip sites-enabled -x default
|
Decompress
|
Decompress |
|---|
unzip -l chorke-nginx-academia.prod.2024-06-28T2023.zip
unzip chorke-nginx-academia.prod.2024-06-28T2023.zip
unzip chorke-nginx-academia.prod.2024-06-28T2023.zip -d chorke-nginx-academia-production
|
Commands
|
Commands | |
|---|---|
-r: Recursive child folder
-x: Exclude file from the archive
-l: List the contents of the archive
-f: Specifies the name of the archive
|
|
DateTime Format
|
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
|
References | ||
|---|---|---|