Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have downloaded a large number of .zip files and need to extract them using 7z (p7zip) at the command line. 7z x is successful, but 7z x *.zip returns a "No files to process" error.

How can I unzip the files as a batch instead of one at a time?

share|improve this question

closed as off topic by Skyhawk, voretaq7 May 24 '12 at 20:36

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

for zip in *.zip; do
    7z x "$zip"
share|improve this answer
up vote 2 down vote accepted


ls -1 *.zip | xargs -L 1 7z x


  1. ls -1 *.zip outputs a one-column list of zip files to stdout (ls dash-one, not ls dash-ell)
  2. xargs -L 1 takes each filename returned and passes it to 7z x as a parameter.
share|improve this answer

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