How can I use the 7-Zip CLI (7za.exe) on Windows to create .tgz archives, as I use
tar zcvf archive.tgz source_files on Linux?
Now Windows supports a native tar command:
tar -cvzf output.tar.gz input_dir
Found it here.
If you're just compressing 1 file into the tarball then
7za a archive.tgz source_file will work.
If you want to add lots of files to the tar then you need to do it in two steps:
Create the tar
7za a archive.tar source_files
Then compress it
7za a archive.tgz archive.tar
And, optionally, delete the 'temporary' tar