How to convert
I have a bunch of
.tar.gz files that I would like to convert to
.tar.xz for a better compression.
How to do this efficiently? A command like this would be great: How do I convert tar.bz2 to tar.gz?.
Here are the two commands I'm using to create a tar gz and tar xz:
- TAR GZ
tar czf folder.tar.gz folder
- TAR XZ (LZMA)
tar cfJ folder.tar.xz folder
Is there a better way than:
tar xvzf folder.tar.gz && tar cfJ folder.tar.xz folder && rm -rf folder?