0

I have a list of http urls http://host.com/url1 http://host.com/url2 http://host.com/url3

Each url is pointed to some file

Is there a way to compress all that files to single zip archive without downloading files locally? I don't see a way to do this with linux zip command. It allows to have list of files, but not list of urls

Any ideas?

1

Using ksh eg.

(
  for URL in http://host.com/url1 http://host.com/url2 http://host.com/url3
  do
    wget -O - -q "$URL"
  done
) | gzip -c > mysingle.zip

You now have all data zipped into one file, but not really an archive: you can't extract one of the files, you'd need to add a separator in the loop.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.