From c2aeb492ec085bb26eafeb09c5f8b35aa880a646 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reynir=20Bj=C3=B6rnsson?= Date: Tue, 29 Oct 2024 09:21:56 +0100 Subject: [PATCH] gptar-update.md: Add shell language --- articles/gptar-update.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/articles/gptar-update.md b/articles/gptar-update.md index f7dbaff..62199e8 100644 --- a/articles/gptar-update.md +++ b/articles/gptar-update.md @@ -29,7 +29,7 @@ This prompted me to [use a different link indicator](https://github.com/reynir/g This worked pretty great. Listing the archive using GNU tar I still get `GPTAR`, but with verbose listing it's displayed as a `--Volume Header--`: -``` +```shell $ tar -tvf disk.img Vr-------- 0/0 16896 1970-01-01 01:00 GPTAR--Volume Header-- -rw-r--r-- 0/0 14 1970-01-01 01:00 test.txt @@ -37,7 +37,7 @@ Vr-------- 0/0 16896 1970-01-01 01:00 GPTAR--Volume Header-- And more importantly the `GPTAR` entry is ignored when extracting: -``` +```shell $ mkdir tmp $ cd tmp/ $ tar -xf ../disk.img @@ -49,7 +49,7 @@ test.txt Unfortunately, this broke bsdtar! -``` +```shell $ bsdtar -tf disk.img bsdtar: Damaged tar archive bsdtar: Error exit delayed from previous errors. @@ -62,7 +62,7 @@ Unacceptable! So I started to dig into libarchive where bsdtar comes from. To my surprise, after building bsdtar from the git clone of the source code it ran perfectly fine! -``` +```shell $ ./bsdtar -tf ../gptar/disk.img test.txt ```