mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
chore(docker): get remote images' digest without pulling them
This commit is contained in:
19
snippets/manage archives.sh
Normal file
19
snippets/manage archives.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# `tar -a` guesses the compression algorithm from the archive extension
|
||||
|
||||
# Create archives
|
||||
tar czvf "/tmp/prometheus-data-$(date +'%s-%F-%H-%m-%S').tar.gz" '/var/lib/prometheus/data'
|
||||
tar cjpvf 'docs.tar.bz2' "${HOME}/Documents" "${HOME}/Downloads" 'docs.txt'
|
||||
|
||||
# List the contents of archives
|
||||
tar tf "/tmp/prometheus-data-1718104097-2024-06-11-11-06-17.tar.gz"
|
||||
tar tf 'kubectl.tar' 'kubectl'
|
||||
|
||||
# Test archives by reading their contents or extracting them to stdout.
|
||||
tar tf 'archive.tar' > '/dev/null'
|
||||
tar tOf 'archive.tar' > '/dev/null'
|
||||
|
||||
# Extract archives
|
||||
tar xf 'portage-latest.tar.xz' -C '/mnt/gentoo/usr'
|
||||
tar xpf 'stage3-amd64-'*'.tar.xz' --checkpoint '250'
|
||||
Reference in New Issue
Block a user