Jar

From Chorke Wiki
Revision as of 01:51, 16 January 2026 by Shahed (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
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