i92guboj |
12-20-2010 04:56 PM |
Quote:
Originally Posted by rajinkajun
(Post 4197325)
Does anyone know if there's any way to convert an archive [ex: .tar.gz] to another archive format [ex. 7z]? I've been googling and searching for the better part of a week and I haven't come across any program that can do it on the linux platform.
|
I'd like to see a program that can do exactly that on any other platform. I bet it doesn't exist, for most archive formats at least.
The fact that you don't see how the files are extracted and piped into a new file means nothing.
While theoretically possible it just doesn't pay off to convert one thing into another. It's (computationally speaking) a waste of time.
The same happens with images, usually. To convert a jpeg into a png you usually load the image using the correct decoder, then once the image is in a raw bitmap format in memory you save it again using whatever encoder you prefer. You don't convert jpeg to png: you decode jpeg, then encode png. For archives it's quite the same.
That is almost always true, unless two archive formats use the same algorithm, differing only in minor details in the file format that can be parsed easily.
Quote:
I don't want to have to extract the files and then place them in another archive format. Just seems like a waste of time, considering the versatility of the OS.
|
If all you want is not to see the ugly engines just use any GUI you like. If you don't mind using the shell you will find how easily that can be done with minimal pain.
As simple as.
Code:
for file in *.tar.bz2; do tar xf "$file" - | 7z a "${file%.tar.bz2}.7z"; done
Untested.
|