Last active
October 8, 2025 09:26
-
Star
(100)
You must be signed in to star a gist -
Fork
(10)
You must be signed in to fork a gist
-
-
Save chabala/22ed01d7acf9ee0de9e3d867133f83fb to your computer and use it in GitHub Desktop.
Revisions
-
chabala revised this gist
Sep 18, 2022 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,3 +11,10 @@ $ cat takeout-20201023T123551Z-*.tgz | tar xzivf - ``` `tar` has been around forever, they didn't design it to need custom scripts to deal with multipart archives. Since it's extracting the combined archive, there's no 'mess of partial directories' to be merged. It just works, as intended. An additional tip, courtesy of Dmitriy Otstavnov (@bvc3at): if you have `pv` available, you can track the progress of the extraction: ```shell > pv takeout-* | tar xzif - 190GiB 2:37:54 [18.9MiB/s] [==============> ] 30% ETA 5:03:49 ``` -
chabala created this gist
Oct 27, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ Recently found some clowny gist was the top result for 'google takeout multiple tgz', where it was using two bash scripts to extract all the tgz files and then merge them together. Don't do that. Use brace expansion, `cat` the TGZs, and extract: ```console $ cat takeout-20201023T123551Z-{001..011}.tgz | tar xzivf - ``` You don't even need to use brace expansion. Globbing will order the files numerically: ```console $ cat takeout-20201023T123551Z-*.tgz | tar xzivf - ``` `tar` has been around forever, they didn't design it to need custom scripts to deal with multipart archives. Since it's extracting the combined archive, there's no 'mess of partial directories' to be merged. It just works, as intended.