How to create tar.gz file in Linux using command line
The procedure to create a tar.gz file on Linux is as follows:
Open the terminal application in Linux
Run tar command to create an archived named file.tar.gz for given directory name by running: tar -czvf file.tar.gz directory
Verify tar.gz file using the ls command and tar command
Let us see all commands and options in details.