Jar: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
Created page with " jar --version ==Compress== <syntaxhighlight lang="bash"> cd /etc/nginx jar -cvf chorke-nginx_academia-production-D20240628-T2023-ZP0800.jar sites-enabled </syntaxhighlight> ==Decompress== <syntaxhighlight lang="bash"> 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 </syntaxhighli..."
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
jar --version
{|class='wikitable' style='width:100%;margin:-11px 0 6px 0'
|valign='top' style='width:50%'|
<syntaxhighlight style='margin:3px 0' lang='bash'>
jar --version
which jar
</syntaxhighlight>
 
|valign='top' style='width:50%'|
|}


==Compress==
==Compress==
<syntaxhighlight lang="bash">
{|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
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">
{|class='wikitable mw-collapsible' style='width:100%;margin:3px 0'
jar -tvf chorke-nginx_academia-production-D20240628-T2023-ZP0800.jar
!scope='col' style='text-align:left'|
jar -xvf chorke-nginx_academia-production-D20240628-T2023-ZP0800.jar
Decompress
jar -xvf chorke-nginx_academia-production-D20240628-T2023-ZP0800.jar chorke-nginx-academia-production
|-
|valign='top'|
<syntaxhighlight style='margin:3px 0' lang='bash'>
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
</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'>
-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
</syntaxhighlight>
</syntaxhighlight>


==Explanation==
|valign='top' style='width:50%'|
-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==
==DateTime Format==
<syntaxhighlight lang="bash">
{|class='wikitable mw-collapsible' style='width:100%;margin:3px 0'
echo "$(date +'D%Y%m%d-T%H%M')-Z$(date +'%z'|tr '+-' 'PM')"
!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')"
:'
:'
D20240628-T2023-ZP0800
2025-10-10T1010
├─ D20240628
├─ 2025-10-21
│  ├─ D    « Date
│  ├─ 2025 « %Y
│  ├─ 2024 « %Y
│  ├─  10 « %m
│  ├─ 06   « %m
│  └─  10 « %d
│  └─ 28   « %d
└─ T1010
├─ -T2023
  ├─    T « Time
│  ├─ -   « -
  ├─  10 « %H
│  ├─ T   « Time
  └─  10 « %M
│  ├─ 20   « %H
│  └─ 23   « %M
└─ -ZP0800
  ├─ -    « -
  ├─ Z    « Zone
  ├─ P    « {P: Plus (+), M:Minus (-)}
  └─ 0800 « Time Offset
'
'
</syntaxhighlight>
</syntaxhighlight>
|valign='top' style='width:50%'|
|}


==References==
==References==
{|
{|class='wikitable mw-collapsible' style='width:100%;margin:3px 0'
| valign="top" |
!scope='col' style='text-align:left' colspan='3'|
References
|-
|valign='top' style='width:33%'|
* [[7Zip]]
* [[7Zip]]
* [[Zip]]
* [[Zip]]
* [[Tar]]
* [[Tar]]
* [[Jar]]


| valign="top" |
|valign='top' style='width:34%'|
 
| valign="top" |


|valign='top' style='width:33%'|
|-
|-
| colspan="3" |
|valign='top'|
----
|-
| valign="top" |
* [[Minikube Systemd]]
* [[Minikube Systemd]]
* [[Alpine/Morefine]]
* [[Alpine/Morefine]]
Line 72: Line 104:
* [[TMux]]
* [[TMux]]


| valign="top" |
|valign='top'|
* [[Chorke Academia Backup]]
* [[Chorke Academia Backup]]
* [https://stackoverflow.com/questions/10555483/ MediaWiki Escape </code>&#124;</code>]
* [https://stackoverflow.com/questions/10555483/ MediaWiki Escape </code>&#124;</code>]
* [[Disk Performance]]
* [[Disk Performance]]
* [[Google Cloud CLI]]
* [[Google Cloud CLI]]
* [[LXC/Logrotate|LXC » Logrotate]]
* [[Free Up RAM]]
* [[Free Up RAM]]
* [[AWS CLI]]
* [[AWS CLI]]


| valign="top" |
|valign='top'|
 
|}
|}

Latest revision as of 01:51, 16 January 2026

jar --version
which jar

Compress

Compress

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

Decompress

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

Commands

Commands

-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

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