Is there any command on Linux to convert .tar.gz files to .zip? -


i've received files in .tar.gz type application i'm using accepts .zip files. need easy way of converting .tar.gz files .zip without loosing of data.

does renaming .zip work? i've tried when click on file it's showing invalid file.

any thoughts or inputs this?

you can convert archive foo.tar.gz zipped archive foo.zip command similar one:

tar xzof foo.tar.gz | zip foo.zip $(tar tf foo.tar.gz) 

in details: tar xzof foo.tar.gz extracts (x) gzipped (z) archive standard output (o). here f used provide input file name.

standard input piped zip, first argument name of zipped file produce. following argument list of files compress, can obtain directly tar t command, run on initial .tar.gz file.

for more details, have @ manual pages of zip , tar utilities.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -