Zip: Difference between revisions
Jump to navigation
Jump to search
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
sudo apt install zip unzip | sudo apt -qq update | ||
sudo apt install -y zip unzip | |||
unzip -V | unzip -V | ||
zip -V | zip -V | ||
Line 48: | Line 49: | ||
{| | {| | ||
| valign="top" | | | valign="top" | | ||
* [[7Zip]] | |||
* [https://en.wikipedia.org/wiki/ZIP_(file_format) ZIP] | * [https://en.wikipedia.org/wiki/ZIP_(file_format) ZIP] | ||
* [[Tar]] | * [[Tar]] | ||
Line 68: | Line 70: | ||
* [[Crontab]] | * [[Crontab]] | ||
* [[PyEnv]] | * [[PyEnv]] | ||
* [[Drone]] | |||
* [[TMux]] | * [[TMux]] | ||
| valign="top" | | | valign="top" | | ||
* [[Chorke Academia Backup]] | |||
* [[Google Cloud CLI]] | |||
* [[AWS CLI]] | |||
| valign="top" | | | valign="top" | | ||
|} | |} |
Latest revision as of 09:48, 29 June 2024
sudo apt -qq update sudo apt install -y zip unzip unzip -V zip -V
Compress
cd /etc/nginx
zip -r chorke-nginx_academia-production-20240628-T2023-ZP0800.zip sites-enabled
zip -r chorke-nginx_academia-production-20240628-T2023-ZP0800.zip sites-enabled -x default
Decompress
unzip -l chorke-nginx_academia-production-20240628-T2023-ZP0800.zip
unzip chorke-nginx_academia-production-20240628-T2023-ZP0800.zip
unzip chorke-nginx_academia-production-20240628-T2023-ZP0800.zip -d chorke-nginx-academia-production
Explanation
-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
echo "$(date +'%Y%m%d-T%H%M')-Z$(date +'%z'|tr '+-' 'PM')"
:'
20240628-T2023-ZP0800
├─ 20240628
│ ├─ 2024 « %Y
│ ├─ 06 « m%
│ └─ 28 « %d
├─ -T2023
│ ├─ - « -
│ ├─ T « Time
│ ├─ 20 « %H
│ └─ 23 « %M
└─ -ZP0800
├─ - « -
├─ Z « Zone
├─ P « {P: Plus (+), M:Minus (-)}
└─ 0800 « Time Offset
'
References
| ||