Jar: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
No edit summary
Line 4: Line 4:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
cd /etc/nginx
cd /etc/nginx
jar -cvf chorke-nginx_academia-production-D20240628-T2023-ZP0800.jar sites-enabled
jar -cvf chorke-nginx-academia.prod.2024-06-28T2023.jar sites-enabled
</syntaxhighlight>
</syntaxhighlight>


==Decompress==
==Decompress==
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
jar -tvf chorke-nginx_academia-production-D20240628-T2023-ZP0800.jar
jar -tvf chorke-nginx-academia.prod.2024-06-28T2023.jar
jar -xvf chorke-nginx_academia-production-D20240628-T2023-ZP0800.jar
jar -xvf chorke-nginx-academia.prod.2024-06-28T2023.jar
jar -xvf chorke-nginx_academia-production-D20240628-T2023-ZP0800.jar chorke-nginx-academia-production
jar -xvf chorke-nginx-academia.prod.2024-06-28T2023.jar chorke-nginx-academia.prod
</syntaxhighlight>
</syntaxhighlight>



Revision as of 13:39, 21 October 2025

jar --version

Compress

cd /etc/nginx
jar -cvf chorke-nginx-academia.prod.2024-06-28T2023.jar sites-enabled

Decompress

jar -tvf chorke-nginx-academia.prod.2024-06-28T2023.jar
jar -xvf chorke-nginx-academia.prod.2024-06-28T2023.jar
jar -xvf chorke-nginx-academia.prod.2024-06-28T2023.jar chorke-nginx-academia.prod

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