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

# Working with .tar.gz archives

# Create and extract .tar.gz files

xinit@localhost:~$ # Create a .tar.gz archive:

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

xinit@localhost:~$ # Create a .tar.gz archive with long options:

xinit@localhost:~$ tar \

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

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

xinit@localhost:~$ # Extract a .tar.gz archive:

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

xinit@localhost:~$ # Extract a .tar.gz archive with long options:

xinit@localhost:~$ tar \

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

    archive.tar.gz

xinit@localhost:~$ # List of all available options:

xinit@localhost:~$ tar --help

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