BASH Daily —List The Content Of Multiple ZIP Files

I was recently helping a family member with recovering some data from their backup files. It turned out that the backups were stored in multiple ZIP files. They were hundreds of them.

So how was I to list the content of all these ZIP files so that I could then pipe them to a grep ( or awk ( command to filter for the files I was looking for?

I did find that the command unzip( had an argument -l that did just that; list out a list of the contents of a ZIP file. But there was another issue. The fact I had hundreds of them. So I just tried unzip -l *.zip but it gave me this result for some reason (I was running out of time):

Not very helpful.

So I decided to code a solution with a loop… Anyways, here it is:

Here is an extract of the result:



Just a Dev (

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store