Jar: Difference between revisions
Jump to navigation
Jump to search
| Line 24: | Line 24: | ||
==DateTime Format== | ==DateTime Format== | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
echo "$(date +' | 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> | ||
Revision as of 13:36, 21 October 2025
jar --version
Compress
cd /etc/nginx
jar -cvf chorke-nginx_academia-production-D20240628-T2023-ZP0800.jar sites-enabled
Decompress
jar -tvf chorke-nginx_academia-production-D20240628-T2023-ZP0800.jar
jar -xvf chorke-nginx_academia-production-D20240628-T2023-ZP0800.jar
jar -xvf chorke-nginx_academia-production-D20240628-T2023-ZP0800.jar chorke-nginx-academia-production
Explanation
-c: Create a new archive -x: Extract the archive -u: Update the archive -v: Verbosely list files processed -t: List the contents of the archive -f: Specifies the name of the archive
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
|
| ||