Creating/extracting .tar.gz

From Andreida
Revision as of 12:26, 21 December 2025 by Andreas (talk | contribs) (Created page with "=== Create an archive === tar zchf /var/db-dump/your-name-1-images.tgz -C / var/www/wiki.your-wiki-1/images/ === Extract an archive === tar -xzf /var/db-dump/your-name-1-images.tgz -C / var/www/wiki.your-wiki-1/images/ === Arguments used before === -c create an archive, one file that contains the target and everything below -x extract -f file -z use gzip on the archive -C change to this directory before any operation -h follow symlinks; files/dirs in symlinks...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Create an archive

tar zchf /var/db-dump/your-name-1-images.tgz -C / var/www/wiki.your-wiki-1/images/

Extract an archive

tar -xzf /var/db-dump/your-name-1-images.tgz -C / var/www/wiki.your-wiki-1/images/

Arguments used before

-c create an archive, one file that contains the target and everything below
-x extract
-f file
-z use gzip on the archive
-C change to this directory before any operation
-h follow symlinks; files/dirs in symlinks get archived too