How to curl and unzip to a certain directory?

you curl a file to stdout then unzip to some dir.


1 Answer 1


unzip (version 6.00) can not extract files read from standard input (this is mentioned in the unzip manual, in the "BUGS" section), so the file will need to be saved locally before extraction:

curl -o myfile.zip "some URL"
unzip myfile.zip -d "some directory"
rm -f myfile.zip

where some directory is the directory into which you'd like to extract the archive.

  • 14
    But jar can... Jan 30, 2018 at 22:18
  • 7
    As @StephenKitt said: curl $zip_file_url | jar xv
    – Noam Manos
    Jan 15, 2020 at 13:51

Not the answer you're looking for? Browse other questions tagged .