Tar: Difference between revisions
Jump to navigation
Jump to search
(Created page with "==Compress== <syntaxhighlight lang="bash"> cd /etc/nginx tar -czvf chorke-nginx_academia-production-20240628-T2023-ZP0800.tar.gz sites-enabled </syntaxhighlight> ==Decompress== <syntaxhighlight lang="bash"> tar -tzvf chorke-nginx_academia-production-20240628-T2023-ZP0800.tar.gz tar -xzvf chorke-nginx_academia-production-20240628-T2023-ZP0800.tar.gz tar -xzvf chorke-nginx_academia-production-20240628-T2023-ZP0800.tar.gz\ -C chorke-nginx-academia-production </syntaxhighl...") |
|||
Line 3: | Line 3: | ||
cd /etc/nginx | cd /etc/nginx | ||
tar -czvf chorke-nginx_academia-production-20240628-T2023-ZP0800.tar.gz sites-enabled | tar -czvf chorke-nginx_academia-production-20240628-T2023-ZP0800.tar.gz sites-enabled | ||
tar --exclude=default -czvf chorke-nginx_academia-production-20240628-T2023-ZP0800.tar.gz sites-enabled | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 06:53, 28 June 2024
Compress
cd /etc/nginx
tar -czvf chorke-nginx_academia-production-20240628-T2023-ZP0800.tar.gz sites-enabled
tar --exclude=default -czvf chorke-nginx_academia-production-20240628-T2023-ZP0800.tar.gz sites-enabled
Decompress
tar -tzvf chorke-nginx_academia-production-20240628-T2023-ZP0800.tar.gz
tar -xzvf chorke-nginx_academia-production-20240628-T2023-ZP0800.tar.gz
tar -xzvf chorke-nginx_academia-production-20240628-T2023-ZP0800.tar.gz\
-C chorke-nginx-academia-production
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
| ||