Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create tar file with 7zip

Tags:

tar

7zip

I'm trying to create a tar file on windows using 7zip.

Most of the documents I found said to do something like this:

7z a -ttar -so dwt.tar dwt/

But when I tried to run it I got this error:

Command Line Error: I won't write compressed data to a terminal

I'm currently using 7-Zip [64] 16.04

Any idea?

like image 346
radicaled Avatar asked Nov 13 '18 14:11

radicaled


1 Answers

On Linux:

tar cf - <source folder> | 7z a -si <Destination archive>.tar.7z

from here

On Windows:

7za.exe a -ttar -so archive.tar source_files | 7za.exe a -si archive.tgz

from here.

like image 84
Tu.Ma. Avatar answered Sep 20 '22 22:09

Tu.Ma.