*ARGS.TECH | BLOG | TAR command cheatsheet. Create and extract .tar.gz archives
Loading...
BLOG
TAR command cheatsheet. Create and extract .tar.gz archives
Terminal: ~

# A simple, visual cheatsheet for the `tar` command in Linux.

# Learn how to create (-czvf) and extract (-xzvf) .tar.gz

# archives with practical, copy-paste ready examples.


# Create a .tar.gz archive:

xinit@localhost:~$ tar -czvf archive.tar.gz /path/to/source/dir


# Create a .tar.gz archive with long options:

xinit@localhost:~$ tar \

    --create --gunzip --verbose --file \

    archive.tar.gz /path/to/source/dir


# Extract a .tar.gz archive:

xinit@localhost:~$ tar -xzvf archive.tar.gz


# Extract a .tar.gz archive with long options:

xinit@localhost:~$ tar \

    --extract --gunzip --verbose --file \

    archive.tar.gz


# List of all available options:

xinit@localhost:~$ tar --help

www.args.tech
Top button
© *ARGS.TECH
2025
v 2.9.17